~ubuntu-branches/ubuntu/saucy/cairo-dock-plug-ins/saucy

« back to all changes in this revision

Viewing changes to weather/src/applet-config.c

  • Committer: Package Import Robot
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2012-08-19 00:37:51 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20120819003751-rcy2836qb5jfj31i
Tags: 3.0.99.beta1-0ubuntu1
* New upstream beta release.
* Upstream ChangeLog (main changes):
 - Better integration of Unity: support of the Launcher API and better
    support of indicators
 - All configuration windows have been merged into a single one.
 - Added progress bars in several applets and in the Dbus API
 - The Music Player applet can control players in the systray.
 - Icons of the taskbar can be separated from launchers or not
 - And as always ... various bug fixes and improvements :-)
* Fixed one bug reported on Launchpad:
 - Bookmark name in thunar wrong when shortcut added on plugin (LP: #995634)
* debian: Used 'wrap-and-sort' tool
* debian/control:
 - Bump Cairo-Dock version
 - Updated my email address
* debian/rules:
 - Added Disks, Global-Menu and Doncky applets.
* debian/cairo-dock-plug-ins.install:
 - Added 'appmenu-registrar' ('Global-Menu' applet)
    and 'cairo-dock-unity-bridge' ('Dbus' applet)

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        
94
94
        //\____________________ On met a jour le panneau de conf.
95
95
        CairoDockModuleInstance *myApplet = g_object_get_data (G_OBJECT (pMenuItem), "cd-applet");
96
 
        GtkWidget *pCodeEntry = CD_APPLET_GET_CONFIG_PANEL_WIDGET ("Configuration", "location code");
 
96
        GtkWidget *pCodeEntry = myData.pCodeEntry;
97
97
        if (pCodeEntry)
98
98
                gtk_entry_set_text (GTK_ENTRY (pCodeEntry), cLocationCode);
99
99
        cd_weather_free_location_list ();
103
103
        GError *erreur = NULL;
104
104
        cd_weather_free_location_list ();
105
105
        
106
 
        GtkWidget *pCodeEntry = CD_APPLET_GET_CONFIG_PANEL_WIDGET ("Configuration", "location code");
 
106
        GtkWidget *pCodeEntry = myData.pCodeEntry;
107
107
        if (!pCodeEntry)
108
108
        {
109
109
                cd_debug ("request took too long, discard results");
193
193
        myData.pGetLocationTask = cairo_dock_get_url_data_async (cURL, (GFunc) _on_got_location_data, myApplet);
194
194
        g_free (cURL);
195
195
}
196
 
void cd_weather_load_custom_widget (CairoDockModuleInstance *myApplet, GKeyFile* pKeyFile)
 
196
static void _on_destroyed_code_entry (GtkWidget *pEntry, CairoDockModuleInstance *myApplet)
 
197
{
 
198
        myData.pCodeEntry = NULL;
 
199
}
 
200
void cd_weather_load_custom_widget (CairoDockModuleInstance *myApplet, GKeyFile* pKeyFile, GSList *pWidgetList)
197
201
{
198
202
        if (!myApplet)  // if called when the applet is not started
199
203
                return;
200
204
        cd_debug ("%s (%s)\n", __func__, myIcon->cName);
201
205
        //\____________ On recupere le widget.
202
 
        GtkWidget *pCodeEntry = CD_APPLET_GET_CONFIG_PANEL_WIDGET ("Configuration", "location code");
 
206
        CairoDockGroupKeyWidget *pGroupKeyWidget = cairo_dock_gui_find_group_key_widget_in_list (pWidgetList, "Configuration", "location code");
 
207
        GtkWidget *pCodeEntry = cairo_dock_gui_get_first_widget (pGroupKeyWidget);
 
208
        myData.pCodeEntry = pCodeEntry;
203
209
        g_return_if_fail (pCodeEntry != NULL);
 
210
        g_signal_connect (myData.pCodeEntry, "delete", G_CALLBACK (_on_destroyed_code_entry), myApplet);  /// TODO: remove it on stop, to handle the case our applet is deactivated while the config window is opened.
204
211
        
205
212
        GtkWidget *pWidgetBox = gtk_widget_get_parent (pCodeEntry);
206
213