~cairo-dock-team/ubuntu/precise/cairo-dock-plug-ins/984054

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-10 00:05:57 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810000557-pfxoz5w7hbyclcqh
Tags: 2.2.0~0beta4-0ubuntu1
* New Upstream Version (LP: #614625)
* Fixed a few bugs on LP:
 - LP: #483963: Dustbin applet does not display trashes on all volumes
 - LP: #485159: Some apps have problem with Systray
 - LP: #500677: ~/.xsession-errors is too much used by CD
 - LP: #500979: Shortcuts: the order gets messed up
 - LP: #521531: Mail: crashes on Maildir
 - LP: #519915: GTG: create a new applet to control GTG
 - LP: #526138: GMenu doesn't handle desktop file exec strings properly
 - LP: #531317: CMake: Added an error if the prefix of 'cairo-dock-plugins'
                 is not the same 'cairo-dock-core'
 - LP: #531319: CMake: check the version of 'cairo-dock' when building
                 'cairo-dock-plugins'
 - LP: #537115: Click at the position where icon lavel was, the icon
                 and dock still receive the event
 - LP: #537943: Terminal applet shortkey behaviour
 - LP: #538637: Trash applet doesn't create .trashinfo files on XFCE
 - More details on the 'ChangeLog' file
* debian/rules:
 - Autotools has been replaced by CMake
 - cdbs is now used.
* debian/copyright:
 - Updated with the new applets
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev, libindicator-dev, libdbusmenu-glib-dev
   libido-0.1-dev, libical-dev, libdbusmenu-gtk-dev as Build-deps
 - Bump Standard-Version to 3.9.1
 - Wget is required for dnd2share applet
 - Added the exact realease for 'cairo-dock-dev' in order to prevent any
    build error if this package is not already available (thx to didrocks)
* debian/cairo-dock-plug-ins*.install:
 - All sonames are now installed into lib32 or lib64 (lib*)

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                if (CD_APPLET_MY_ICONS_LIST == NULL)
48
48
                {
49
49
                        cairo_dock_remove_dialog_if_any (myIcon);
50
 
                        cairo_dock_show_temporary_dialog_with_icon (D_("No items in the stack.\nYou can add files, URL, and even piece of text by dragging them onto the icon."), myIcon, myContainer, 8000., "same icon");
 
50
                        cairo_dock_show_temporary_dialog_with_icon (D_("No items in the stack.\nYou can add files, URL, and even a piece of text by dragging them onto the icon."), myIcon, myContainer, 8000., "same icon");
51
51
                }
52
52
                return CAIRO_DOCK_LET_PASS_NOTIFICATION;  // on laisse passer la notification (pour ouvrir le sous-dock au clic).
53
53
        }
71
71
static void _cd_stack_clear_stack (GtkMenuItem *menu_item, CairoDockModuleInstance *myApplet)
72
72
{
73
73
        CD_APPLET_ENTER;
74
 
        int iAnswer = cairo_dock_ask_question_and_wait (D_("Clear the stack ?"), myIcon,  myContainer);
 
74
        int iAnswer = cairo_dock_ask_question_and_wait (D_("Clear the stack?"), myIcon,  myContainer);
75
75
        if (iAnswer == GTK_RESPONSE_YES)
76
76
                cd_stack_clear_stack (myApplet);
77
77
        CD_APPLET_LEAVE ();
92
92
        Icon *pIcon = data[1];
93
93
        
94
94
        CairoContainer *pContainer = (myDock ? CAIRO_CONTAINER (myIcon->pSubDock) : myContainer);
95
 
        gchar *cNewName = cairo_dock_show_demand_and_wait (D_("Set new name for this item :"), pIcon, pContainer, pIcon->cName);
 
95
        gchar *cNewName = cairo_dock_show_demand_and_wait (D_("Set new name for this item:"), pIcon, pContainer, pIcon->cName);
96
96
        if (cNewName == NULL)
97
97
                CD_APPLET_LEAVE ();
98
98
                //return ;
101
101
        cd_stack_set_item_name (cDesktopFilePath, cNewName);
102
102
        g_free (cDesktopFilePath);
103
103
        
104
 
        cairo_dock_set_icon_name (myDrawContext, cNewName, pIcon, pContainer);
 
104
        cairo_dock_set_icon_name (cNewName, pIcon, pContainer);
105
105
        g_free (cNewName);
106
106
        CD_APPLET_LEAVE ();
107
107
}
112
112
        Icon *pIcon = data[1];
113
113
        
114
114
        GtkClipboard *pClipBoard = (myConfig.bSelectionClipBoard ? gtk_clipboard_get (GDK_SELECTION_PRIMARY) : gtk_clipboard_get (GDK_SELECTION_CLIPBOARD));
115
 
        g_print ("stack : '%s' has been copied into the clipboard\n", pIcon->cCommand);
 
115
        cd_debug ("stack : '%s' has been copied into the clipboard", pIcon->cCommand);
116
116
        gtk_clipboard_set_text (pClipBoard, pIcon->cCommand, -1);
117
117
        CD_APPLET_LEAVE ();
118
118
}
157
157
CD_APPLET_ON_BUILD_MENU_BEGIN
158
158
        static gpointer data[2] = {NULL, NULL};
159
159
        data[0] = myApplet;
160
 
        data[1] = pClickedIcon;
 
160
        data[1] = CD_APPLET_CLICKED_ICON;
161
161
        GtkWidget *pSubMenu = CD_APPLET_CREATE_MY_SUB_MENU ();
162
162
                
163
 
        if (pClickedIcon != NULL && pClickedIcon != myIcon)
 
163
        if (CD_APPLET_CLICKED_ICON != NULL && CD_APPLET_CLICKED_ICON != myIcon)
164
164
        {
165
165
                CD_APPLET_ADD_IN_MENU_WITH_STOCK_AND_DATA (D_("Copy (middle click)"), GTK_STOCK_COPY, _cd_stack_copy_content, pSubMenu, data);
166
166
                CD_APPLET_ADD_IN_MENU_WITH_STOCK_AND_DATA (D_("Cut"), GTK_STOCK_CUT, _cd_stack_cut_item, pSubMenu, data);
170
170
                CD_APPLET_ADD_SEPARATOR_IN_MENU (pSubMenu);
171
171
                
172
172
                CD_APPLET_ADD_IN_MENU_WITH_STOCK_AND_DATA (D_("Open (click)"), GTK_STOCK_EXECUTE, _cd_stack_open_item, pSubMenu, data);
173
 
                if (pClickedIcon->iVolumeID == 1)
 
173
                if (CD_APPLET_CLICKED_ICON->iVolumeID == 1)
174
174
                        CD_APPLET_ADD_IN_MENU_WITH_STOCK_AND_DATA (D_("Open folder"), GTK_STOCK_OPEN, _cd_stack_open_item_folder, pSubMenu, data);
175
175
                
176
176
                CD_APPLET_ADD_SEPARATOR_IN_MENU (pSubMenu);
179
179
        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Paste (drag'n'drop)"), GTK_STOCK_PASTE, _cd_stack_paste_content, pSubMenu);
180
180
        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Clear the stack"), GTK_STOCK_CLEAR, _cd_stack_clear_stack, pSubMenu);
181
181
        CD_APPLET_ADD_ABOUT_IN_MENU (pSubMenu);
182
 
        if (pClickedIcon != NULL && pClickedIcon != myIcon)
183
 
                return CAIRO_DOCK_INTERCEPT_NOTIFICATION;
 
182
        if (CD_APPLET_CLICKED_ICON != NULL && CD_APPLET_CLICKED_ICON != myIcon)
 
183
                CD_APPLET_LEAVE (CAIRO_DOCK_INTERCEPT_NOTIFICATION);
184
184
CD_APPLET_ON_BUILD_MENU_END
185
185
 
186
186
 
191
191
 
192
192
 
193
193
CD_APPLET_ON_MIDDLE_CLICK_BEGIN
194
 
        if (pClickedIcon != NULL && pClickedIcon != myIcon)
 
194
        if (CD_APPLET_CLICKED_ICON != NULL && CD_APPLET_CLICKED_ICON != myIcon)
195
195
        {
196
 
                gpointer data[2] = {myApplet, pClickedIcon};
 
196
                gpointer data[2] = {myApplet, CD_APPLET_CLICKED_ICON};
197
197
                _cd_stack_copy_content (NULL, data);
198
198
        }
199
199
CD_APPLET_ON_MIDDLE_CLICK_END