~ubuntu-branches/ubuntu/saucy/cairo-dock-plug-ins/saucy-proposed

« back to all changes in this revision

Viewing changes to Scooby-Do/src/applet-appli-finder.c

  • Committer: Jamie Strandboge
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2012-03-26 14:35:01 UTC
  • mfrom: (25.1.1 cairo-dock-plug-ins)
  • Revision ID: jamie@canonical.com-20120326143501-r3c8mq6n2vyc0e2j
* New upstream release. (LP: #961579)
* Upstream ChangeLog: (main changes)
 - Updated translations
 - MusicPlayer:
  + When choosing the player the first time, launch it and set the name
  + It seems the latest stable version of rhythmbox now re-uses this DBus
     address: org.mpris.MediaPlayer2.rhythmbox
 - Use the default bg color for always visible icons
 - GMenu: check if kde4-applications.menu and lxde-applications.menu
    are available
 - Dbus:
  + Bash interface: fixed a typo
  + Changed the third-party applets dir on the server for the 3.0
  + Enabling threads on the Python Interface
  + Modified the old SetEmblem method to use the new overlays
 - Enable GVFS if detected
 - Indicators: handle the case where the service crashes
 - Status-Notifier:
  + Indicator 0.4.90 (and newer) has a new variable (Title)
  + Display Label first if it's available instead of Title first
  + Fixed a bug with empty labels
  + KDE's watcher: if ItemIsMenu is true (e.g. Klipper) and if we only show
     the menu on left click, we emit a signal to the application to show
     its own menu
  + checked if the menu path is different that '/NO_DBUSMENU'
  + IAS: checked if an item is not already available in the systray
     (workaround) and fixed a few typos
  + Added a space between icons and fixed the wrong drawing of the icon
     on a vertical dock if the icon can be resized
  + Used cairo_dock_add_path_to_icon_theme
 - Sound control:
  + Fixed a small bug on reload (invisible icon)
  + Updated the Dbus names to match with Ubuntu 12.04
  + Backported the latest version of Ubuntu's indicator-sound into the
     Sound-Control applet
  + Make some items in the menu invisible if not available
  + Worked around a bug in libindicator, which keeps internally
     the service pointer
 - Logout:
  + Fixed a tiny memory leak
  + Look for a different icon's size if we want to display this icon in
     a menu/a dock/an emblem
 - PowerManager:
  + Removed an extraseparators in the menu
 - Clock:
  + Used the logical rectangle in order to fix the position of the text
  + Removed unused files
  + Removed useless translations (log.x and log.y = 0)
  + Only used this ratio to limit the deformation with the height
  + Fixed a problem with the ratio if this applet is displayed in
     a vertical dock
 - Remote Control: fixed a crash during the 'click' signal
 - Slider:
  + When reloading, display the changes immediately
  + Added the possibility to refresh the images list from the menu
  + Fixed the loading of the image on startup, when the applet's size is
     not yet stable
  + Code cleaning
 - Fixed an error when compiling without libindicator
 - A few minor changes (comments, factorisation, etc)
 - Recent-Events: if zeitgeist is not yet running on first search,
    try 3 times before giving up.
* debian/control:
 - Updated the version of cairo-dock-[core;data;dev].

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
        int iNbAppliLoaded = 0;
175
175
        Icon *pIcon;
176
176
        gboolean bLoadTexture = (CAIRO_CONTAINER_IS_OPENGL (g_pMainDock));
 
177
        gint iDesiredIconSize = 10; // cairo_dock_search_icon_size (GTK_ICON_SIZE_MENU); // 16px (was 48px but why?) // to data?
177
178
        GList *a;
178
179
        for (a = myData.pCurrentApplicationToLoad; a != NULL && iNbAppliLoaded < 3; a = a->next)  // on en charge 3 d'un coup.
179
180
        {
180
181
                pIcon = a->data;
181
182
                if (pIcon->pIconBuffer == NULL)
182
183
                {
183
 
                        pIcon->fWidth = 48.;
184
 
                        pIcon->fHeight = 48.;
 
184
                        pIcon->fWidth = iDesiredIconSize;
 
185
                        pIcon->fHeight = iDesiredIconSize;
185
186
                        pIcon->fScale = 1.;
186
 
                        gchar *cIconPath = cairo_dock_search_icon_s_path (pIcon->cFileName);
187
 
                        pIcon->pIconBuffer = cairo_dock_create_surface_for_icon (cIconPath, 48., 48);
 
187
                        gchar *cIconPath = cairo_dock_search_icon_s_path (pIcon->cFileName, iDesiredIconSize);
 
188
                        pIcon->pIconBuffer = cairo_dock_create_surface_for_icon (cIconPath, iDesiredIconSize, iDesiredIconSize);
188
189
                        g_free (cIconPath);
189
190
                        if (bLoadTexture)
190
191
                                pIcon->iIconTexture = cairo_dock_create_texture_from_surface (pIcon->pIconBuffer);
230
231
                        bMatch = FALSE;
231
232
                else
232
233
                {
233
 
                        bMatch = (g_strncasecmp (pIcon->cCommand, myData.sCurrentText->str, myData.sCurrentText->len) == 0);
 
234
                        bMatch = (g_ascii_strncasecmp (pIcon->cCommand, myData.sCurrentText->str, myData.sCurrentText->len) == 0);
234
235
                        if (!bMatch)
235
236
                        {
236
237
                                gchar *str = strchr (pIcon->cCommand, '-');  // on se limite au 1er tiret.
237
238
                                if (str && *(str-1) != ' ')  // on verifie qu'il n'est pas un tiret d'option
238
239
                                {
239
240
                                        str ++;
240
 
                                        bMatch = (g_strncasecmp (str, myData.sCurrentText->str, myData.sCurrentText->len) == 0);
 
241
                                        bMatch = (g_ascii_strncasecmp (str, myData.sCurrentText->str, myData.sCurrentText->len) == 0);
241
242
                                }
242
243
                        }
243
244
                }