GNOME Bugzilla – Bug 660432
Convert use of deprecated GtkTable to GtkGrid
Last modified: 2011-12-03 07:52:09 UTC
Vinagre uses GtkTable in a few places, which should be converted to GtkGrid, as GtkTable is now deprecated: http://mail.gnome.org/archives/gtk-devel-list/2011-September/msg00242.html Current uses, found with git grep, are: data/vinagre.ui:131: <object class="GtkTable" id="table3"> data/vinagre.ui:332: <object class="GtkTable" id="table2"> data/vinagre.ui:835: <object class="GtkTable" id="table1"> plugins/spice/vinagre-spice-plugin.c:203: GtkTable *table;
Created attachment 200293 [details] [review] This patch replaces Gtk_Table appearances for Gtk_Grid
Review of attachment 200293 [details] [review]: I tested this and it seems fine, as I could not notice any differences in the way the widgets appear in the UI. I just have a couple of style changes to ask for: * drop the file summary in the commit, as git already provides this information * in vinagre-spice-plugin.c, for the gtk_grid_* functions, leave a space between the function name and the opening parenthesis I also like to keep the first line of my commit messages under 50 characters, so I would prefer ‘Use GtkGrid rather than deprecated GtkTable’. Thanks!
Created attachment 200294 [details] [review] Use GtkGrid rather than deprecated GtkTable
Created attachment 200295 [details] [review] Use GtkGrid rather than deprecated GtkTable.
Comment on attachment 200295 [details] [review] Use GtkGrid rather than deprecated GtkTable. Pushed to master as commit 77f29613b2df75435a975fe483c3fab340fb1b9e, thanks!
Review of attachment 200295 [details] [review]: Not sure how you managed to compile the last patch... ::: plugins/spice/vinagre-spice-plugin.c @@ +217,2 @@ label = gtk_label_new (" "); + gtk_grid_attach (grid, label, 0, 0, 1, 1); The 'grid' variable needs to be explicitly retyped from GtkWidget * to GtkGrid @@ +229,3 @@ check = gtk_check_button_new_with_mnemonic (_("_Resize guest")); g_object_set_data (G_OBJECT (box), "resize_guest", check); + gtk_grid_attach (grid, check, 1, 0, 1, 1); The 'grid' variable needs to be explicitly retyped from GtkWidget * to GtkGrid @@ +237,3 @@ check = gtk_check_button_new_with_mnemonic (_("_Share clipboard")); g_object_set_data (G_OBJECT (box), "auto_clipboard", check); + gtk_grid_attach (table, check, 1, 1, 1, 1); Usage of 'table' here @@ +245,3 @@ check = gtk_check_button_new_with_mnemonic (_("_Scaling")); g_object_set_data (G_OBJECT (box), "scaling", check); + gtk_grid_attach (table, check, 1, 2, 1, 1); Same here @@ +287,3 @@ g_free (ssh_host); + gtk_grid_attach (table, box2, 1, 3, 1, 1); And also here
Created attachment 202077 [details] [review] vinagre-3.3.2-spice-GtkGrid.patch Patch that fixes pending issues
You're right... I missed that :/ Thx for the fix
Comment on attachment 202077 [details] [review] vinagre-3.3.2-spice-GtkGrid.patch I pushed this patch to master as 65cd12a41bfb253f9143f2c9c1ab950f41857f47, thanks.