~cairo-dock-team/ubuntu/quantal/cairo-dock/3.1.0

« back to all changes in this revision

Viewing changes to src/help/applet-notifications.c

  • Committer: Matthieu Baerts
  • Date: 2012-10-09 13:47:11 UTC
  • mfrom: (1.1.27)
  • Revision ID: matttbe@gmail.com-20121009134711-fk18ynngtbpwpnau
* New upstream release. (LP: #1064130)
 - Even if there are a lot of changes, this is a 'bug-fix' version.
   Changes are big mainly because the translations have been updated and
   a lot of GCC warnings (from -Wall and -Wextra) have been fixed.
* Upstream ChangeLog (detailed changes since the last version):
 - Only disable drag'n'drop onto the dock when the dock is completely
    locked, not when the icons position is locked.
 - Prevented quicklists for an icon
    (e.g. used by musicPlayer applet to remove double menu entries)
 - Menu: renamed this title: 'Below *other* windows'
   + fixed a typo (bIsMaximized was checked a bit too late)
 - Man: 'A' ('ask-backend') option was missing and 'i' (indirect) is
    no longer supported + for 'colors', used 'F' instead of 'A' which
    is already used by 'ask-backend'
 - When a label is updated, update the drawing accordingly
 - Dialogs: fixed a crash if the dialog was forced above (GTK3)
 - Advanced GUI: fixed a bug that prevented to edit a 2nd instance of
    an applet
    + renamed 'cairo-dock-gui-main.[ch]' to 'cairo-dock-gui-advanced.[ch]'
 - Don't close the dock if no plug-ins are found, just display the message
 - Menu on appli: put the window actions into a single menu-item, which
    avoid having a crowded menu or another sub-menu
 - Default view: use all the screen space to avoid the jitter of the dock
    when it is resized (although this is mainly a problem in the Window
    Managers, unfortunately very few handle the resizing correctly)
 - Locked dock: prevent any modification when the dock is locked
 - Advanced GUI: fixed a small bug when reloading an applet
 - Application manager: handle the case where there is no dock
    (e.g. for cairo-desklet)
 - when starting in maintenance mode, force the use of the advanced
    configuration (easier to fix problem)
 - Compilation: fixed a lot of warnings during the compilation
    (mostly 'unused-variable' and 'unused-parameters' by using
     G_GNUC_UNUSED) when using -Wall and -Wextra
 - GTK3.4: used GtkGrid instead of GtkTable (now deprecated)
 - Labels in vertical dock:
  + fixed the calculation with a helper
  + terminate with a gradation if the label is too large to be fully drawn
  + fixed a small offset in the position of the X icon geometry
 - Indicators: icons was not visible with the Cairo backend if we wanted to
    have an image as indicator of the active window and if we don't give
    any image
 - Fixed a bug in cairo_dock_create_surface_from_pattern
    (when using a pattern as the background image)
 - Themes: Added write rights in the new theme folder
    (if the user has just changed its current theme)
 - OpenGL backend: fixed a small bug in the drawing of always visible icons
 - Fixed a crash when re-inserting an applet into a dock
 - GUI: fixed 2 bugs in the module widget
 - Taskbar: when placing appli icons after launchers, don't count
    separators as launchers
 - When loading an image based on a pattern, constrain the image height,
    so that it only repeats on its width
 - Taskbar: added back the use of _NET_WM_STATE_DEMANDS_ATTENTION
    (this might be used by Skype and therefore solve the bug LP: #1013635)
 - Menu: Window Actions: drawn: Min - Max - Close instead of
    Max - Min - Close + drawn Min and Max only if the window is not hidden
 - Code cleaning: removed a few useless g_print (or used cd_debug instead)
 - Menu: Custom icon: only display images on the file chooser
 - Menu: Custom Icon: do not display the menu entry if bLockAll is defined
    (if the action is useless) + do not stop the action if bLockIcons
 - Widget Items: the main GtkWindow is needed to build other widgets
 - po: imported translations from Launchpad and Added Lithuanian language
 - Options: AskBackend: show the backend even if we force the use of the
    OpenGL backend
 - Help: Help menu entry: this menu entry no longer worked: used
    cairo_dock_show_items_gui like the Edit menu entry
 - Menu: Help menu entry: if we use the simple mode, switch to the advanced
    mode because the help settings are only available there
 - Some cleaning
* debian/patches/bzr_screens_with_null_dimensions.patch:
 - Removed (now in upstream)
* Added bzr_translate_titles_of_categories_and_readme from upstream:
 - Translate the titles of all main categories and views' description
* debian/control:
 - Bumpped Cairo-Dock Plug-ins versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
 
51
51
//\___________ Define here the entries you want to add to the menu when the user right-clicks on your icon or on its subdock or your desklet. The icon and the container that were clicked are available through the macros CD_APPLET_CLICKED_ICON and CD_APPLET_CLICKED_CONTAINER. CD_APPLET_CLICKED_ICON may be NULL if the user clicked in the container but out of icons. The menu where you can add your entries is available throught the macro CD_APPLET_MY_MENU; you can add sub-menu to it if you want.
52
 
static void _cd_show_config (GtkMenuItem *menu_item, gpointer data)
 
52
static void _cd_show_config (G_GNUC_UNUSED GtkMenuItem *menu_item, G_GNUC_UNUSED gpointer data)
53
53
{
54
54
        cairo_dock_show_main_gui ();
55
55
}
56
56
 
57
 
static void _cd_show_help_gui (GtkMenuItem *menu_item, gpointer data)
 
57
static void _cd_show_help_gui (G_GNUC_UNUSED GtkMenuItem *menu_item, G_GNUC_UNUSED gpointer data)
58
58
{
59
 
        cairo_dock_show_module_gui ("Help");
 
59
        cairo_dock_show_items_gui (myIcon, myContainer, myApplet, -1);
60
60
}
61
61
 
62
62
static void _launch_url (const gchar *cURL)
64
64
        if  (! cairo_dock_fm_launch_uri (cURL))
65
65
        {
66
66
                gchar *cCommand = g_strdup_printf ("\
67
 
which xdg-open > /dev/null && xdg-open %s || \
68
 
which firefox > /dev/null && firefox %s || \
69
 
which konqueror > /dev/null && konqueror %s || \
70
 
which iceweasel > /dev/null && konqueror %s || \
71
 
which opera > /dev/null && opera %s ",
72
 
                        cURL,
73
 
                        cURL,
74
 
                        cURL,
75
 
                        cURL,
76
 
                        cURL);  // pas super beau mais efficace ^_^
 
67
which xdg-open > /dev/null && xdg-open \"%s\" & || \
 
68
which firefox > /dev/null && firefox \"%s\" & || \
 
69
which konqueror > /dev/null && konqueror \"%s\" & || \
 
70
which iceweasel > /dev/null && iceweasel \"%s\" & || \
 
71
which chromium-browser > /dev/null && chromium-browser \"%s\" & || \
 
72
which midori > /dev/null && midori \"%s\" & || \
 
73
which epiphany > /dev/null && epiphany \"%s\" & || \
 
74
which opera > /dev/null && opera \"%s\" &",
 
75
                        cURL,
 
76
                        cURL,
 
77
                        cURL,
 
78
                        cURL,
 
79
                        cURL,
 
80
                        cURL,
 
81
                        cURL,
 
82
                        cURL);  // not very nice but it works ^_^
77
83
                int r = system (cCommand);
 
84
                if (r < 0)
 
85
                        cd_warning ("Not able to launch this command: %s", cCommand);
78
86
                g_free (cCommand);
79
87
        }
80
88
}
81
 
static void _cd_show_help_online (GtkMenuItem *menu_item, gpointer data)
 
89
static void _cd_show_help_online (G_GNUC_UNUSED GtkMenuItem *menu_item, G_GNUC_UNUSED gpointer data)
82
90
{
83
91
        _launch_url (CAIRO_DOCK_WIKI_URL);
84
92
}
98
106
        return bResult;
99
107
}
100
108
 
101
 
static void _cd_remove_gnome_panel (GtkMenuItem *menu_item, gpointer data)
 
109
static void _cd_remove_gnome_panel (G_GNUC_UNUSED GtkMenuItem *menu_item, G_GNUC_UNUSED gpointer data)
102
110
{
103
111
        int r = system ("gconftool-2 -s '/desktop/gnome/session/required_components/panel' --type string \"\"");
 
112
        if (r < 0)
 
113
                cd_warning ("Not able to launch this command: gconftool-2");
104
114
}
105
115
 
106
 
static void _on_got_active_plugins (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer data)
 
116
static void _on_got_active_plugins (DBusGProxy *proxy, DBusGProxyCall *call_id, G_GNUC_UNUSED gpointer data)
107
117
{
108
118
        cd_debug ("%s ()", __func__);
109
119
        // get the active plug-ins.
167
177
                        NULL,
168
178
                        cPluginsList);
169
179
                int r = system ("killall unity-panel-service"); // to have the main gtk menu back.
 
180
                if (r < 0)
 
181
                        cd_warning ("Not able to launch this command: killall");
170
182
                g_free (cPluginsList);
171
183
        }
172
184
        else  // should not happen since we detect Unity before proposing this action.
176
188
        g_strfreev (plugins);
177
189
}
178
190
 
179
 
static void _cd_remove_unity (GtkMenuItem *menu_item, gpointer data)
 
191
static void _cd_remove_unity (G_GNUC_UNUSED GtkMenuItem *menu_item, G_GNUC_UNUSED gpointer data)
180
192
{
181
193
        // first get the active plug-ins.
182
194
        DBusGProxy *pActivePluginsProxy = cairo_dock_create_new_session_proxy (