[Xfce4-commits] [panel-plugins/xfce4-weather-plugin] 07/25: Various fixes

noreply at xfce.org noreply at xfce.org
Mon Sep 17 00:14:04 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-weather-plugin.

commit 80877d51ded7f5fb3d00ac56e2314d654f00d78d
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Sep 9 20:49:49 2018 -0400

    Various fixes
---
 configure.ac.in                  |   1 +
 panel-plugin/weather-config.ui   | 188 +++++++++++++++++++++------------------
 panel-plugin/weather-scrollbox.c |   6 +-
 3 files changed, 103 insertions(+), 92 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 3a4b039..41c2cbe 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -61,6 +61,7 @@ dnl ***********************************
 XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [2.14.0])
 XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.20.0])
 XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.20.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.12.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.12.0])
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.12.0])
 XDT_CHECK_PACKAGE([LIBXML], [libxml-2.0], [2.4.0])
diff --git a/panel-plugin/weather-config.ui b/panel-plugin/weather-config.ui
index 529c570..ea75c16 100644
--- a/panel-plugin/weather-config.ui
+++ b/panel-plugin/weather-config.ui
@@ -2,7 +2,6 @@
 <!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.20"/>
-  <requires lib="libxfce4ui-2" version="4.12"/>
   <object class="GtkAdjustment" id="adjustment1">
     <property name="lower">1</property>
     <property name="upper">10</property>
@@ -72,6 +71,9 @@
     <property name="destroy_with_parent">True</property>
     <property name="icon_name">xfce4-weather</property>
     <property name="type_hint">dialog</property>
+    <child>
+      <placeholder/>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="box1">
         <property name="can_focus">False</property>
@@ -123,13 +125,13 @@
             <property name="can_focus">True</property>
             <property name="border_width">6</property>
             <child>
-              <object class="GtkTable" id="grid1">
+              <object class="GtkGrid" id="grid1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
                 <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
                 <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
@@ -139,6 +141,10 @@
                     <property name="mnemonic_widget">text_loc_name</property>
                     <property name="xalign">0</property>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="label2">
@@ -150,6 +156,7 @@
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">1</property>
                   </packing>
                 </child>
@@ -163,6 +170,7 @@
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">2</property>
                   </packing>
                 </child>
@@ -176,6 +184,7 @@
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">3</property>
                   </packing>
                 </child>
@@ -189,18 +198,21 @@
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">4</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="separator1">
+                  <object class="GtkSeparator" id="separator1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="margin_top">6</property>
                     <property name="margin_bottom">6</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">5</property>
+                    <property name="width">3</property>
                   </packing>
                 </child>
                 <child>
@@ -215,7 +227,9 @@
                     </attributes>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">6</property>
+                    <property name="width">3</property>
                   </packing>
                 </child>
                 <child>
@@ -227,15 +241,10 @@
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkButton" id="button_loc_change">
                     <property name="label" translatable="yes">Change...</property>
                     <property name="visible">True</property>
@@ -246,28 +255,11 @@
                   </object>
                   <packing>
                     <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <object class="GtkHBox" id="box2">
+                  <object class="GtkBox" id="box2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
@@ -302,10 +294,11 @@
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="top_attach">1</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="box3">
+                  <object class="GtkBox" id="box3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
@@ -340,10 +333,11 @@
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="top_attach">2</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="box4">
+                  <object class="GtkBox" id="box4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
@@ -381,6 +375,7 @@ Altitude is given in meters above sea level, or alternatively in feet by changin
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="top_attach">3</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
@@ -393,14 +388,16 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="top_attach">4</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkSpinButton" id="update_spinner">
-                    <property name="can_focus">True</property>
-                    <property name="no_show_all">True</property>
+                  <object class="GtkSpinner" id="update_spinner">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">7</property>
                   </packing>
                 </child>
@@ -424,13 +421,13 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
               </packing>
             </child>
             <child>
-              <object class="GtkTable" id="grid2">
+              <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
                 <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
                 <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="label10">
                     <property name="visible">True</property>
@@ -440,6 +437,10 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="mnemonic_widget">combo_unit_temperature</property>
                     <property name="xalign">0</property>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="label11">
@@ -451,6 +452,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">1</property>
                   </packing>
                 </child>
@@ -464,6 +466,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">2</property>
                   </packing>
                 </child>
@@ -477,6 +480,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">3</property>
                   </packing>
                 </child>
@@ -490,18 +494,21 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">4</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="separator2">
+                  <object class="GtkSeparator" id="separator2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="margin_top">6</property>
                     <property name="margin_bottom">6</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">5</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
@@ -513,6 +520,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="mnemonic_widget">combo_apparent_temperature</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">6</property>
                   </packing>
                 </child>
@@ -528,12 +536,10 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkComboBoxText" id="combo_unit_pressure">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -628,12 +634,12 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
               </packing>
             </child>
             <child>
-              <object class="GtkTable" id="grid3">
+              <object class="GtkGrid" id="grid3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
                 <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="label17">
                     <property name="visible">True</property>
@@ -644,9 +650,13 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="mnemonic_widget">combo_icon_theme</property>
                     <property name="xalign">0</property>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
                 </child>
                 <child>
-                  <object class="GtkHBox" id="box5">
+                  <object class="GtkBox" id="box5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="hexpand">True</property>
@@ -679,6 +689,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
@@ -692,27 +703,25 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">1</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <object class="GtkHSeparator" id="separator3">
+                  <object class="GtkSeparator" id="separator3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="margin_top">6</property>
                     <property name="margin_bottom">6</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">2</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkLabel" id="label18">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -722,6 +731,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">3</property>
                   </packing>
                 </child>
@@ -741,20 +751,19 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="label19">
+                  <object class="GtkSeparator" id="label19">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="margin_top">6</property>
                     <property name="margin_bottom">6</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">4</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkLabel" id="label20">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -764,6 +773,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">5</property>
                   </packing>
                 </child>
@@ -791,6 +801,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">6</property>
                   </packing>
                 </child>
@@ -809,20 +820,19 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="separator4">
+                  <object class="GtkSeparator" id="separator4">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="margin_top">6</property>
                     <property name="margin_bottom">6</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">7</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkCheckButton" id="check_round_values">
                     <property name="label" translatable="yes">_Round values</property>
                     <property name="visible">True</property>
@@ -832,12 +842,11 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">8</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
-                <child>
-                  <placeholder/>
-                </child>
               </object>
               <packing>
                 <property name="position">2</property>
@@ -856,12 +865,12 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
               </packing>
             </child>
             <child>
-              <object class="GtkTable" id="grid4">
+              <object class="GtkGrid" id="grid4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
-                <property name="column_spacing">12</property>
                 <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
                 <child>
                   <object class="GtkCheckButton" id="check_scrollbox_show">
                     <property name="label" translatable="yes">Show scroll_box</property>
@@ -872,6 +881,10 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
                 </child>
                 <child>
                   <object class="GtkLabel" id="label23">
@@ -885,6 +898,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
@@ -899,6 +913,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   </object>
                   <packing>
                     <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
@@ -909,6 +924,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="xalign">0</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">1</property>
                   </packing>
                 </child>
@@ -925,30 +941,26 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkHSeparator" id="separator5">
+                  <object class="GtkSeparator" id="separator5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="margin_top">6</property>
                     <property name="margin_bottom">6</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">2</property>
+                    <property name="width">3</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <object class="GtkTable" id="grid5">
+                  <object class="GtkGrid" id="grid5">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
-                    <property name="column_spacing">6</property>
                     <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</property>
                     <child>
                       <object class="GtkComboBoxText" id="options_datatypes">
                         <property name="visible">True</property>
@@ -972,6 +984,10 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                           <item id="17" translatable="yes">Precipitation (R)</item>
                         </items>
                       </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                      </packing>
                     </child>
                     <child>
                       <object class="GtkScrolledWindow" id="scrollwindow1">
@@ -989,6 +1005,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="tooltip_text" translatable="yes">These are the values that will be shown in the scrollbox. Select a single value here and click the appropriate button to remove it or move it up and down in the list.</property>
+                                <property name="margin_right">7</property>
                                 <property name="model">liststore1</property>
                                 <child internal-child="selection">
                                   <object class="GtkTreeSelection" id="selection1"/>
@@ -999,13 +1016,15 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                         </child>
                       </object>
                       <packing>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="box6">
+                      <object class="GtkBox" id="box6">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <object class="GtkButton" id="button_add">
@@ -1040,7 +1059,7 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHSeparator" id="separator6">
+                          <object class="GtkSeparator" id="separator6">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="opacity">0</property>
@@ -1088,23 +1107,18 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="height">2</property>
                       </packing>
                     </child>
-                    <child>
-                      <placeholder/>
-                    </child>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">3</property>
+                    <property name="width">3</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkCheckButton" id="check_scrollbox_animate">
                     <property name="label" translatable="yes">Animate _transitions between labels</property>
                     <property name="visible">True</property>
@@ -1115,16 +1129,12 @@ Leave this field empty to use the timezone set by your system. Invalid entries w
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">4</property>
+                    <property name="width">3</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkButton" id="button_scrollbox_font">
                     <property name="label" translatable="yes">Select _font</property>
                     <property name="visible">True</property>
diff --git a/panel-plugin/weather-scrollbox.c b/panel-plugin/weather-scrollbox.c
index 3ac21f9..76abef1 100644
--- a/panel-plugin/weather-scrollbox.c
+++ b/panel-plugin/weather-scrollbox.c
@@ -198,7 +198,7 @@ gtk_scrollbox_get_preferred_width (GtkWidget *widget,
 
   gtk_scrollbox_size_request (widget, &requisition);
 
-  *minimal_width = *natural_width = requisition.width;
+  *minimal_width = *natural_width = requisition.width + 12;
 }
 
 
@@ -250,8 +250,8 @@ gtk_scrollbox_draw_event(GtkWidget *widget,
 
         gtk_render_layout (gtk_widget_get_style_context (GTK_WIDGET (widget)),
                            cr,
-                           width, 
-                           height, 
+                           6, 
+                           height - 2, 
                            layout);
     }
     return result;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list