~ubuntu-branches/ubuntu/quantal/cairo-dock-plug-ins/quantal-201208191523

« back to all changes in this revision

Viewing changes to tomboy/src/tomboy-notifications.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-09-07 02:38:17 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100907023817-ish9a53i2wn0m7zg
Tags: 2.2.0~0rc1-0ubuntu1
* New Upstream Version (LP: #632054)
* Fixed a few bugs on LP:
 - LP: #616176 Dust Bin Hang and Incorrect Configuration
 - LP: #604034 Change terminal tab's name lost the color
 - LP: #582452 GMenu does not contain any applications
* Fixed a few bugs on glx-dock forum:
 - Fixed support of GMusicBrowser.
 - AlsaMixer has no emblem.
 - Status-Notifier doesn't be drawed into the dock.
* Updated translations
* debian/control:
 - Added cairo-dock-core as build-depends in order to prevent
   some builds errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
                _launch_tomboy ();
72
72
        }
73
73
        else
74
 
                return CAIRO_DOCK_LET_PASS_NOTIFICATION;
 
74
                CD_APPLET_LEAVE (CAIRO_DOCK_LET_PASS_NOTIFICATION);
75
75
CD_APPLET_ON_CLICK_END
76
76
 
77
77
 
183
183
        cd_tomboy_reset_icon_marks (TRUE);
184
184
}
185
185
CD_APPLET_ON_BUILD_MENU_BEGIN
 
186
        gboolean bClickOnNotes = (pClickedIcon !=  myIcon);
 
187
        
 
188
        // Main Menu
 
189
        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Add a note"), GTK_STOCK_ADD, _cd_tomboy_add_note, CD_APPLET_MY_MENU);
 
190
        
 
191
        if (bClickOnNotes && pClickedIcon != NULL)
 
192
        {
 
193
                CD_APPLET_ADD_IN_MENU_WITH_STOCK_AND_DATA (D_("Delete this note"), GTK_STOCK_REMOVE, _cd_tomboy_delete_note, CD_APPLET_MY_MENU, pClickedIcon);
 
194
        }
 
195
        
186
196
        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Reload notes"), GTK_STOCK_REFRESH, _cd_tomboy_reload_notes, CD_APPLET_MY_MENU);
187
 
        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Add a note"), GTK_STOCK_ADD, _cd_tomboy_add_note, CD_APPLET_MY_MENU);
188
 
        
189
 
        if (pClickedContainer == CAIRO_CONTAINER (myIcon->pSubDock) || myDesklet)
 
197
                
 
198
        if (bClickOnNotes)  // on ne le fait pas pour un clic sur myIcon, car le sous-dock gene le dialogue.
190
199
        {
191
 
                if (pClickedIcon != NULL && pClickedIcon !=  myIcon)
192
 
                {
193
 
                        CD_APPLET_ADD_IN_MENU_WITH_STOCK_AND_DATA (D_("Delete this note"), GTK_STOCK_REMOVE, _cd_tomboy_delete_note, CD_APPLET_MY_MENU, pClickedIcon);
194
 
                }
 
200
                CD_APPLET_ADD_SEPARATOR_IN_MENU (CD_APPLET_MY_MENU);
195
201
                
196
202
                CD_APPLET_ADD_IN_MENU_WITH_STOCK  (D_("Search"), GTK_STOCK_FIND, _cd_tomboy_search_for_content, CD_APPLET_MY_MENU);
197
203
                CD_APPLET_ADD_IN_MENU(D_("Search for tag"), _cd_tomboy_search_for_tag, CD_APPLET_MY_MENU);
212
218
                                break ;
213
219
                        }
214
220
                }
215
 
                if (pClickedIcon != NULL)
216
 
                        return CAIRO_DOCK_INTERCEPT_NOTIFICATION;
217
221
        }
 
222
        CD_APPLET_ADD_SEPARATOR_IN_MENU (CD_APPLET_MY_MENU);
218
223
        CD_APPLET_ADD_ABOUT_IN_MENU (CD_APPLET_MY_MENU);
 
224
        
 
225
        if (bClickOnNotes && pClickedIcon != NULL)
 
226
                CD_APPLET_LEAVE (CAIRO_DOCK_INTERCEPT_NOTIFICATION);
219
227
CD_APPLET_ON_BUILD_MENU_END
220
228
 
221
229
 
234
242
 
235
243
static gboolean _popup_dialog (Icon *pIcon)
236
244
{
 
245
        CD_APPLET_ENTER;
237
246
        CairoContainer *pContainer = CD_APPLET_MY_ICONS_LIST_CONTAINER;
238
247
        if (pContainer->bInside)
239
248
        {
245
254
                                myConfig.cIconDefault != NULL ? myConfig.cIconDefault : MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE);
246
255
        }
247
256
        myData.iSidPopupDialog = 0;
248
 
        return FALSE;
 
257
        CD_APPLET_LEAVE (FALSE);
249
258
}
250
259
gboolean cd_tomboy_on_change_icon (gpointer pUserData, Icon *pIcon, CairoDock *pDock, gboolean *bStartAnimation)
251
260
{
 
261
        CD_APPLET_ENTER;
252
262
        if (myData.iSidPopupDialog != 0)
253
263
        {
254
264
                g_source_remove (myData.iSidPopupDialog);
269
279
                myData.iSidPopupDialog = g_timeout_add (500, (GSourceFunc)_popup_dialog, pIcon);
270
280
        }
271
281
        
272
 
        return CAIRO_DOCK_LET_PASS_NOTIFICATION;
 
282
        CD_APPLET_LEAVE (CAIRO_DOCK_LET_PASS_NOTIFICATION);
273
283
}