After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 660432 - Convert use of deprecated GtkTable to GtkGrid
Convert use of deprecated GtkTable to GtkGrid
Status: RESOLVED FIXED
Product: vinagre
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: vinagre-maint
vinagre-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-29 09:06 UTC by David King
Modified: 2011-12-03 07:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch replaces Gtk_Table appearances for Gtk_Grid (27.93 KB, patch)
2011-10-30 17:17 UTC, Victoria Martínez de la Cruz
needs-work Details | Review
Use GtkGrid rather than deprecated GtkTable (3.13 KB, patch)
2011-10-30 18:08 UTC, Victoria Martínez de la Cruz
none Details | Review
Use GtkGrid rather than deprecated GtkTable. (27.61 KB, patch)
2011-10-30 18:23 UTC, Victoria Martínez de la Cruz
committed Details | Review
vinagre-3.3.2-spice-GtkGrid.patch (2.63 KB, patch)
2011-11-24 17:36 UTC, Tomas Bzatek
committed Details | Review

Description David King 2011-09-29 09:06:06 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;
Comment 1 Victoria Martínez de la Cruz 2011-10-30 17:17:49 UTC
Created attachment 200293 [details] [review]
This patch replaces Gtk_Table appearances for Gtk_Grid
Comment 2 David King 2011-10-30 17:47:38 UTC
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!
Comment 3 Victoria Martínez de la Cruz 2011-10-30 18:08:22 UTC
Created attachment 200294 [details] [review]
Use GtkGrid rather than deprecated GtkTable
Comment 4 Victoria Martínez de la Cruz 2011-10-30 18:23:32 UTC
Created attachment 200295 [details] [review]
Use GtkGrid rather than deprecated GtkTable.
Comment 5 David King 2011-10-30 18:33:19 UTC
Comment on attachment 200295 [details] [review]
Use GtkGrid rather than deprecated GtkTable.

Pushed to master as commit 77f29613b2df75435a975fe483c3fab340fb1b9e, thanks!
Comment 6 Tomas Bzatek 2011-11-24 17:34:37 UTC
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
Comment 7 Tomas Bzatek 2011-11-24 17:36:39 UTC
Created attachment 202077 [details] [review]
vinagre-3.3.2-spice-GtkGrid.patch

Patch that fixes pending issues
Comment 8 Victoria Martínez de la Cruz 2011-11-24 21:29:10 UTC
You're right... I missed that :/ Thx for the fix
Comment 9 David King 2011-12-03 07:51:58 UTC
Comment on attachment 202077 [details] [review]
vinagre-3.3.2-spice-GtkGrid.patch

I pushed this patch to master as 65cd12a41bfb253f9143f2c9c1ab950f41857f47, thanks.