]> gitweb.michael.orlitzky.com - xfce4-hdaps.git/blobdiff - panel-plugin/xfce4-hdaps.c
COPYING: update license to AGPL-3.
[xfce4-hdaps.git] / panel-plugin / xfce4-hdaps.c
index 3f0c156420c2b5daf2f3ff4eac1727a01028623d..95f05eb5f90a14b014b94f6db7d496da45a84e07 100644 (file)
@@ -1,21 +1,22 @@
 /*
  * xfce4-hdaps, an XFCE4 panel plugin for the HDAPS system.
  *
- * Copyright Michael Orlitzky
+ * Copyright (C) 2019 Michael Orlitzky
  *
- * http://michael.orlitzky.com/
+ *   http://michael.orlitzky.com/
  *
  * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details:
+ *
+ *   https://www.gnu.org/licenses/agpl-3.0.html
  *
- * http://www.fsf.org/licensing/licenses/gpl.html
  */
 
 #ifdef HAVE_CONFIG_H
@@ -40,7 +41,7 @@
 static void hdaps_construct(XfcePanelPlugin *plugin);
 
 /* Register the plugin with the panel. */
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(hdaps_construct);
+XFCE_PANEL_PLUGIN_REGISTER(hdaps_construct);
 
 
 void hdaps_save(XfcePanelPlugin *plugin, HdapsPlugin *hdaps) {
@@ -252,7 +253,7 @@ static HdapsPlugin *hdaps_new(XfcePanelPlugin *plugin) {
   /* Make the event box transparent. In newer versions of xfce4-panel
      users can make the panel transparent, so we don't want to stick a
      big opaque box on it. */
-  gtk_event_box_set_visible_window(hdaps->eventbox, FALSE);
+  gtk_event_box_set_visible_window(GTK_EVENT_BOX(hdaps->eventbox), FALSE);
 
   /* Set up the hvbox for the widget, which supports
      both horizontal and vertical (hv) orientations. */
@@ -345,6 +346,9 @@ static gboolean hdaps_size_changed(XfcePanelPlugin *plugin,
     gtk_widget_set_size_request(GTK_WIDGET(plugin), size, -1);
   }
 
+  /* This fixes an issue where the initial icon size is too small. */
+  hdaps_set_icon(hdaps, hdaps->previous_status);
+
   /* We handled the change, so we're supposed to return TRUE. */
   return TRUE;
 }