[telegnome] Avoid deprecated gtk_widget_set_usize



commit 97db9a5e5ae2ef94b9d26aee0a626084c30ce4ff
Author: Colin Watson <cjwatson debian org>
Date:   Tue Feb 2 12:20:45 2016 +0000

    Avoid deprecated gtk_widget_set_usize
    
    * src/gui.c (tg_gui_new_entry): Use gtk_widget_set_size_request
    rather than gtk_widget_set_usize.
    * src/pixpack.c (tg_pixpack_load_image): Likewise.
    * src/view.c (tg_view_update_pixmap): Likewise.

 src/gui.c     |    9 +++++----
 src/pixpack.c |    6 +++---
 src/view.c    |    2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/gui.c b/src/gui.c
index 7df6b26..40874e5 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -348,11 +348,12 @@ tg_gui_new_entry (void)
        entry=gtk_entry_new();
        gtk_entry_set_max_length(GTK_ENTRY(entry),
                                 TG_PAGE_SIZE + 1 + TG_SUBPAGE_SIZE);
-       
+
        /* hack */
-       gtk_widget_set_usize(GTK_WIDGET(entry),
-                            (8 * (TG_PAGE_SIZE + 1 + TG_SUBPAGE_SIZE)),20);
-       
+       gtk_widget_set_size_request(GTK_WIDGET(entry),
+                                   (8 * (TG_PAGE_SIZE + 1 + TG_SUBPAGE_SIZE)),
+                                   20);
+
        /*gtk_entry_set_text(GTK_ENTRY(entry), startpage);*/
              
        g_signal_connect(G_OBJECT(entry), "activate", 
diff --git a/src/pixpack.c b/src/pixpack.c
index 8c3dbcc..f328e40 100644
--- a/src/pixpack.c
+++ b/src/pixpack.c
@@ -284,9 +284,9 @@ tg_pixpack_load_image(TgPixPack *pixpack, GdkPixbuf *pixbuf)
     /* this forces a repaint */
 
     if (private->autosize)
-       gtk_widget_set_usize(GTK_WIDGET(pixpack),
-                            gdk_pixbuf_get_width(private->pixbuf),
-                            gdk_pixbuf_get_height(private->pixbuf));
+       gtk_widget_set_size_request(GTK_WIDGET(pixpack),
+                                   gdk_pixbuf_get_width(private->pixbuf),
+                                   gdk_pixbuf_get_height(private->pixbuf));
     gtk_widget_queue_draw(GTK_WIDGET(pixpack));
 }
 
diff --git a/src/view.c b/src/view.c
index 94ca23b..aba37ee 100644
--- a/src/view.c
+++ b/src/view.c
@@ -78,7 +78,7 @@ tg_view_update_pixmap(TgView *view, GdkPixbuf *pixbuf)
     } else {
        /* no pixbuf, resize to a default and print a warning */
        g_warning("pixbuf == NULL\n");
-       gtk_widget_set_usize(GTK_WIDGET(view->pixpack), 200, 150);
+       gtk_widget_set_size_request(GTK_WIDGET(view->pixpack), 200, 150);
     }
 
     return 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]