~cairo-dock-team/ubuntu/quantal/cairo-dock-plug-ins/3.0.2

« back to all changes in this revision

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

Tags: upstream-2.2.0~0beta4
ImportĀ upstreamĀ versionĀ 2.2.0~0beta4

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
static void _clear_history (GtkMenuItem *menu_item, gpointer data)
31
31
{
32
32
        CD_APPLET_ENTER;
33
 
        int iAnswer = cairo_dock_ask_question_and_wait (D_("Clear the list of the recently uploaded files ?"), myIcon, myContainer);
 
33
        int iAnswer = cairo_dock_ask_question_and_wait (D_("Clear the list of the recently uploaded files?"), myIcon, myContainer);
34
34
        if (iAnswer == GTK_RESPONSE_YES)
35
35
        {
36
36
                cd_dnd2share_clear_working_directory ();
70
70
                        {
71
71
                                cd_warning ("couldn't find the orignial file nor a preview of it");
72
72
                                cairo_dock_remove_dialog_if_any (myIcon);
73
 
                                cairo_dock_show_temporary_dialog_with_icon (D_("Sorry, couldn't find the orignial file nor a preview of it."),
 
73
                                cairo_dock_show_temporary_dialog_with_icon (D_("Sorry, couldn't find the original file nor a preview of it."),
74
74
                                        myIcon,
75
75
                                        myContainer,
76
76
                                        myConfig.dTimeDialogs,
95
95
        if (myConfig.bEnableDialogs)
96
96
        {
97
97
                cairo_dock_remove_dialog_if_any (myIcon);
98
 
                cairo_dock_show_temporary_dialog_with_icon (D_("The URL has been stored into the clipboard.\nJust use 'CTRL+v' to paste it anywhere."),
 
98
                cairo_dock_show_temporary_dialog_with_icon (D_("The URL has been stored in the clipboard.\nJust use 'CTRL+v' to paste it anywhere."),
99
99
                        myIcon,
100
100
                        myContainer,
101
101
                        myConfig.dTimeDialogs,
111
111
                cairo_dock_remove_dialog_if_any (myIcon);
112
112
                cairo_dock_show_temporary_dialog_with_icon (myConfig.iNbItems != 0 ?
113
113
                        D_("No uploaded file available\n.Just drag'n drop a file on the icon to upload it") :
114
 
                        D_("No uploaded file available\n.Consider activating the history if you want the applet remembers previous uploads."),
 
114
                        D_("No uploaded file available.\nConsider activating the history if you want the applet to remember previous uploads."),
115
115
                myIcon,
116
116
                myContainer,
117
117
                myConfig.dTimeDialogs,
128
128
                {
129
129
                        cairo_dock_remove_dialog_if_any (myIcon);
130
130
                        cairo_dock_show_temporary_dialog_with_icon (bIntoClipboard ? 
131
 
                                        D_("The current URL has been stored into the clipboard.\nJust use 'CTRL+v' to paste it anywhere.") :
 
131
                                        D_("The current URL has been stored in the clipboard.\nJust use 'CTRL+v' to paste it anywhere.") :
132
132
                                        D_("The current URL has been stored into the selection.\nJust middle-click to paste it anywhere."),
133
133
                                myIcon,
134
134
                                myContainer,
178
178
                {
179
179
                        if (cMimeType != NULL)
180
180
                        {
181
 
                                g_print ("cMimeType : %s (%s)\n", cMimeType, cMyData);
 
181
                                cd_debug ("cMimeType : %s (%s)\n", cMimeType, cMyData);
182
182
                                if (strncmp (cMimeType, "image", 5) == 0)
183
183
                                        iFileType = CD_TYPE_IMAGE;
184
184
                                else if (strncmp (cMimeType, "video", 5) == 0)
217
217
        }
218
218
        else  // c'est du texte.
219
219
        {
220
 
                // g_print ("TEXT\n");
 
220
                // cd_debug ("TEXT\n");
221
221
                iFileType = CD_TYPE_TEXT;
222
222
        }
223
223
        
224
224
        if (iFileType == CD_UNKNOWN_TYPE)
225
225
        {
226
226
                iFileType = CD_TYPE_FILE;
227
 
                g_print ("we'll consider this as an archive.");
 
227
                cd_debug ("we'll consider this as an archive.");
228
228
        }
229
229
        cd_dnd2share_launch_upload (cFilePath ? cFilePath : cMyData, iFileType);
230
230
        g_free (cFilePath);
332
332
                if (pItem == NULL)
333
333
                {
334
334
                        pItem = g_list_last (myData.pUpoadedItems)->data;
335
 
                        g_print ("dernier item\n");
 
335
                        cd_debug ("dernier item\n");
336
336
                        myData.iCurrentItemNum = g_list_length (myData.pUpoadedItems) - 1;
337
337
                }
338
338
        }
454
454
                {
455
455
                        //g_print ("%d) %s : ", i, pBackend->cUrlLabels[i]);
456
456
                        //g_print (" + %s\n", pItem->cDistantUrls[i]);
457
 
                        CD_APPLET_ADD_IN_MENU_WITH_DATA (pBackend->cUrlLabels[i], _copy_url_into_clipboard, pItemSubMenu, pItem->cDistantUrls[i]);
 
457
                        if (pItem->cDistantUrls[i] != NULL)  // peut etre null (par exemple la tiny url).
 
458
                                CD_APPLET_ADD_IN_MENU_WITH_DATA (pBackend->cUrlLabels[i], _copy_url_into_clipboard, pItemSubMenu, pItem->cDistantUrls[i]);
458
459
                }
459
460
                if (pItem->iFileType != CD_TYPE_TEXT)
460
461
                        CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("Open file"), _show_local_file, pItemSubMenu, pItem);