~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet_3.3

« back to all changes in this revision

Viewing changes to System-Monitor/src/applet-notifications.c

  • Committer: Fabrice Rey
  • Date: 2013-05-19 17:26:37 UTC
  • Revision ID: fabounet03@gmail.com-20130519172637-cc4oyb5q3z0jd139
Here is quite a huge commit; it's "just" to update to the new core API

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        }
37
37
        else
38
38
        {
39
 
                cairo_dock_remove_dialog_if_any (myIcon);
40
 
                cairo_dock_show_temporary_dialog_with_icon (D_("The acquisition of one or more data has failed.\nYou should remove the data that couldn't be fetched."), myIcon, myContainer, 6e3, MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE);
 
39
                gldi_dialogs_remove_on_icon (myIcon);
 
40
                gldi_dialog_show_temporary_with_icon (D_("The acquisition of one or more data has failed.\nYou should remove the data that couldn't be fetched."), myIcon, myContainer, 6e3, MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE);
41
41
        }
42
42
CD_APPLET_ON_CLICK_END
43
43
 
44
44
 
45
 
static void _pop_up_dialog_info (CairoDockModuleInstance *myApplet)
 
45
static void _pop_up_dialog_info (GldiModuleInstance *myApplet)
46
46
{
47
 
        if (myData.pTopDialog != NULL || cairo_dock_remove_dialog_if_any (myIcon))  // don't popup if another dialog is present.
 
47
        if (myData.pTopDialog != NULL)  // we shouldn't get the click event anyway
48
48
                return;
 
49
        gldi_dialogs_remove_on_icon (myIcon);
49
50
        
50
51
        GString *pInfo = g_string_new ("");
51
52
        
65
66
        cd_sysmonitor_get_sensors_info (myApplet, pInfo);
66
67
        
67
68
        // On affiche tout ca.
68
 
        cairo_dock_show_temporary_dialog_with_icon (pInfo->str,
 
69
        gldi_dialog_show_temporary_with_icon (pInfo->str,
69
70
                myIcon, myContainer,
70
71
                15e3,
71
72
                MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE);
80
81
        }
81
82
        else
82
83
        {
83
 
                cairo_dock_show_temporary_dialog_with_icon (D_("The acquisition of one or more data has failed.\nYou should remove the data that couldn't be fetched."), myIcon, myContainer, 5e3, MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE);
 
84
                gldi_dialog_show_temporary_with_icon (D_("The acquisition of one or more data has failed.\nYou should remove the data that couldn't be fetched."), myIcon, myContainer, 5e3, MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE);
84
85
        }
85
86
CD_APPLET_ON_MIDDLE_CLICK_END
86
87
 
87
88
 
88
 
static void _open_system_monitor (GtkMenuItem *menu_item, CairoDockModuleInstance *myApplet)
 
89
static void _open_system_monitor (GtkMenuItem *menu_item, GldiModuleInstance *myApplet)
89
90
{
90
91
        if (myConfig.cSystemMonitorCommand != NULL)
91
92
        {
96
97
                cairo_dock_fm_show_system_monitor ();
97
98
        }
98
99
}
99
 
static void _show_info (GtkMenuItem *menu_item, CairoDockModuleInstance *myApplet)
 
100
static void _show_info (GtkMenuItem *menu_item, GldiModuleInstance *myApplet)
100
101
{
101
102
        _pop_up_dialog_info (myApplet);
102
103
}