Hello community,

here is the log from the commit of package xfce4-panel-plugin-timer for 
openSUSE:Factory checked in at 2012-02-02 18:01:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xfce4-panel-plugin-timer (Old)
 and      /work/SRC/openSUSE:Factory/.xfce4-panel-plugin-timer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xfce4-panel-plugin-timer", Maintainer is "[email protected]"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/xfce4-panel-plugin-timer/xfce4-panel-plugin-timer.changes
        2012-01-09 15:22:55.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.xfce4-panel-plugin-timer.new/xfce4-panel-plugin-timer.changes
   2012-02-02 18:01:02.000000000 +0100
@@ -1,0 +2,14 @@
+Thu Feb  2 10:16:21 UTC 2012 - [email protected]
+
+- added xfce4-panel-plugin-timer-fix-windows.patch in order to set
+  the add/edit dialog transient for the main configuration window
+  and to make the notification dialog modal
+
+-------------------------------------------------------------------
+Thu Jan 26 10:39:21 UTC 2012 - [email protected]
+
+- added xfce4-panel-plugin-timer-fix-timerinfo-truncation.patch
+  which uses a dynamically allocated string to hold timer data in
+  order to prevent truncation in some locales (bnc#742788)
+
+-------------------------------------------------------------------

New:
----
  xfce4-panel-plugin-timer-fix-timerinfo-truncation.patch
  xfce4-panel-plugin-timer-fix-windows.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xfce4-panel-plugin-timer.spec ++++++
--- /var/tmp/diff_new_pack.337qNy/_old  2012-02-02 18:01:04.000000000 +0100
+++ /var/tmp/diff_new_pack.337qNy/_new  2012-02-02 18:01:04.000000000 +0100
@@ -27,10 +27,14 @@
 Group:          System/GUI/XFCE
 Url:            
http://goodies.xfce.org/projects/panel-plugins/xfce4-timer-plugin
 Source0:        xfce4-timer-plugin-%{version}.tar.bz2
+# xfce4-panel-plugin-timer-fix-timerinfo-truncation.patch bnc#742788 
[email protected] -- Use a dynamically allocated string to hold timer data in 
order to prevent truncation in some locales
+Patch0:         xfce4-panel-plugin-timer-fix-timerinfo-truncation.patch
+# xfce4-panel-plugin-timer-fix-windows.patch [email protected] -- Set the 
add/edit dialog transient for the main configuration window and make the 
notification dialog modal
+Patch1:         xfce4-panel-plugin-timer-fix-windows.patch
 BuildRequires:  fdupes
 BuildRequires:  intltool
 BuildRequires:  pkgconfig(libxfce4panel-1.0)
-Requires:       xfce4-panel >= 4.8.0
+Requires:       xfce4-panel >= %{panel_version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -40,6 +44,8 @@
 
 %prep
 %setup -q -n %{plugin_name}-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 %configure --disable-static

++++++ xfce4-panel-plugin-timer-fix-timerinfo-truncation.patch ++++++
diff --git a/src/xfcetimer.c b/src/xfcetimer.c
index 9f59673..3dc0c86 100644
--- a/src/xfcetimer.c
+++ b/src/xfcetimer.c
@@ -83,7 +83,7 @@ static gboolean update_function (gpointer data){
 
   plugin_data *pd=(plugin_data *)data;
   gint elapsed_sec,remaining;
-  gchar tiptext[64];
+  gchar *tiptext = NULL;
   GtkWidget *dialog;
 
   elapsed_sec=(gint)g_timer_elapsed(pd->timer,NULL);
@@ -97,12 +97,12 @@ static gboolean update_function (gpointer data){
      remaining=pd->timeout_period_in_sec-elapsed_sec;
 
      if(remaining>=3600)
-       g_snprintf(tiptext,31,_("%dh %dm %ds left"),remaining/3600, 
(remaining%3600)/60,
+       tiptext = g_strdup_printf(_("%dh %dm %ds left"),remaining/3600, 
(remaining%3600)/60,
             remaining%60);
      else if (remaining>=60)
-       g_snprintf(tiptext,31,_("%dm %ds left"),remaining/60, remaining%60);
+       tiptext = g_strdup_printf(_("%dm %ds left"),remaining/60, remaining%60);
      else
-       g_snprintf(tiptext,31,_("%ds left"),remaining);
+       tiptext = g_strdup_printf(_("%ds left"),remaining);
        
      if(pd->is_paused)
        g_strlcat(tiptext,_(" (Paused)"),64);
@@ -112,6 +112,8 @@ static gboolean update_function (gpointer data){
 
      gtk_tooltips_set_tip(pd->tip,GTK_WIDGET(pd->base),tiptext,NULL);
 
+     g_free(tiptext);
+
      return TRUE;
 
   }
@@ -394,7 +396,7 @@ void make_menu(plugin_data *pd){
   GSList *group=NULL;
   GtkWidget *menuitem;
   gchar *timername,*timerinfo;
-  gchar itemtext[256];
+  gchar *itemtext = NULL;
   gint row_count;
 
 
@@ -436,7 +438,7 @@ void make_menu(plugin_data *pd){
       /*g_fprintf(stderr,"\nMaking menuitem %d while selected is 
%d",row_count,pd->
                                 selected);*/
       
gtk_tree_model_get(GTK_TREE_MODEL(pd->list),&iter,1,&timername,2,&timerinfo,-1);
-      g_snprintf(itemtext,255,"%s (%s)",timername,timerinfo);
+      itemtext = g_strdup_printf("%s (%s)",timername,timerinfo);
       menuitem=gtk_radio_menu_item_new_with_label(group,itemtext);
       gtk_widget_show(menuitem);
       g_free(timername);
@@ -454,6 +456,7 @@ void make_menu(plugin_data *pd){
       gtk_menu_shell_append(GTK_MENU_SHELL(pd->menu),menuitem);
 
       /*g_fprintf(stderr,"\nAdding menuitem with label : %s",itemtext);*/
+      g_free(itemtext);
 
       /* We add the address of menuitem to the array */
       g_array_append_val(pd->menuarray,menuitem);
@@ -516,7 +519,7 @@ static void ok_add(GtkButton *button, gpointer data){
   alarm_data *adata = (alarm_data *)data;
   GtkTreeIter iter;
   gint t1,t2,t3,t;
-  gchar timeinfo[16];
+  gchar *timeinfo = NULL;
 
   /* Add item to the list */
   gtk_list_store_append(adata->pd->list,&iter);
@@ -541,11 +544,11 @@ static void ok_add(GtkButton *button, gpointer data){
 
     gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,5,t,-1);
     if(t1>0)
-       g_snprintf(timeinfo,15,_("%dh %dm %ds"),t1,t2,t3);
+       timeinfo = g_strdup_printf(_("%dh %dm %ds"),t1,t2,t3);
     else if(t2>0)
-       g_snprintf(timeinfo,15,_("%dm %ds"),t2,t3);
+       timeinfo = g_strdup_printf(_("%dm %ds"),t2,t3);
     else
-       g_snprintf(timeinfo,15,_("%ds"),t3);
+       timeinfo = g_strdup_printf(_("%ds"),t3);
 
     gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,2,timeinfo,-1);
   }
@@ -555,7 +558,7 @@ static void ok_add(GtkButton *button, gpointer data){
     t2=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(adata->time_m));
     t=t1*60+t2;
     gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,5,t,-1);
-    g_snprintf(timeinfo,9,_("At %02d:%02d"),t1,t2);
+    timeinfo = g_strdup_printf(_("At %02d:%02d"),t1,t2);
     gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,2,timeinfo,-1);
 
   }
@@ -567,6 +570,7 @@ static void ok_add(GtkButton *button, gpointer data){
   gtk_widget_destroy(GTK_WIDGET(adata->window));
 
   g_free(adata);
+  g_free(timeinfo);
 }
 
 
@@ -593,7 +597,7 @@ static void ok_edit(GtkButton *button, gpointer data){
   alarm_data *adata = (alarm_data *)data;
   GtkTreeIter iter;
   gint t1,t2,t3,t;
-  gchar timeinfo[10];
+  gchar *timeinfo = NULL;
 
   GtkTreeSelection *select;
   GtkTreeModel *model;
@@ -614,12 +618,12 @@ static void ok_edit(GtkButton *button, gpointer data){
         t3=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(adata->times));
         t=t1*3600+t2*60+t3;
         gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,5,t,-1);
-       if(t1>0)
-          g_snprintf(timeinfo,15,_("%dh %dm %ds"),t1,t2,t3);
-       else if(t2>0)
-          g_snprintf(timeinfo,15,_("%dm %ds"),t2,t3);
-       else
-          g_snprintf(timeinfo,15,_("%ds"),t3);
+        if(t1>0)
+           timeinfo = g_strdup_printf(_("%dh %dm %ds"),t1,t2,t3);
+        else if(t2>0)
+           timeinfo = g_strdup_printf(_("%dm %ds"),t2,t3);
+        else
+           timeinfo = g_strdup_printf(_("%ds"),t3);
 
         
gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,2,timeinfo,-1);
       }
@@ -629,7 +633,7 @@ static void ok_edit(GtkButton *button, gpointer data){
         t2=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(adata->time_m));
         t=t1*60+t2;
         gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,5,t,-1);
-        g_snprintf(timeinfo,9,_("At %02d:%02d"),t1,t2);
+        timeinfo = g_strdup_printf(_("At %02d:%02d"),t1,t2);
         
gtk_list_store_set(GTK_LIST_STORE(adata->pd->list),&iter,2,timeinfo,-1);
 
       }
@@ -641,6 +645,7 @@ static void ok_edit(GtkButton *button, gpointer data){
   gtk_widget_destroy(GTK_WIDGET(adata->window));
 
   g_free(adata);
+  g_free(timeinfo);
 }
 
 /**
++++++ xfce4-panel-plugin-timer-fix-windows.patch ++++++
Index: xfce4-timer-plugin-0.6.3/src/xfcetimer.c
===================================================================
--- xfce4-timer-plugin-0.6.3.orig/src/xfcetimer.c
+++ xfce4-timer-plugin-0.6.3/src/xfcetimer.c
@@ -125,7 +125,7 @@ static gboolean update_function (gpointe
   if( (strlen(pd->timeout_command)==0) || !pd->nowin_if_alarm ) {
     gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pd->pbar),1);
     dialog = gtk_message_dialog_new     (NULL,
-                                    GTK_DIALOG_DESTROY_WITH_PARENT,
+                                    GTK_DIALOG_DESTROY_WITH_PARENT | 
GTK_DIALOG_MODAL,
                                     GTK_MESSAGE_WARNING,
                                     GTK_BUTTONS_CLOSE,
                                     _("Beeep! :) \nTime is up!"));
@@ -684,6 +684,7 @@ static void add_edit_clicked (GtkButton
 
   plugin_data *pd = (plugin_data *)data;
 
+  GtkWindow *parent_window;
   GtkWindow *window;
   GtkLabel *label;
   GtkEntry *name,*command;
@@ -702,6 +703,9 @@ static void add_edit_clicked (GtkButton
   adata->pd=pd;
 
   gtk_window_set_modal(GTK_WINDOW(window),TRUE);
+  parent_window = gtk_widget_get_toplevel(buttonn);
+  if (gtk_widget_is_toplevel(parent_window))
+      gtk_window_set_transient_for(GTK_WINDOW(window), 
GTK_WINDOW(parent_window));
 
   vbox=gtk_vbox_new(FALSE, BORDER);
   gtk_container_add(GTK_CONTAINER(window),vbox);
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to