diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-01-08 07:39:36 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-01-08 07:39:36 (GMT) |
commit | 61a99411489f30089fc5a85b07ca7251f720ca1a (patch) | |
tree | e9ae0b2206c58a20bb1429c1a0f7c598a2ea9e17 | |
parent | 5c88982fafe33c1183479e555992c759266b708e (diff) |
Removed deprecation warnings about gtk_misc_set_alignment().
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@450 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | src/dialogs/about.c | 2 | ||||
-rw-r--r-- | src/dialogs/plugins.c | 32 | ||||
-rw-r--r-- | src/dialogs/shellcode.c | 2 | ||||
-rw-r--r-- | src/gtkext/easygtk.c | 3 | ||||
-rw-r--r-- | src/gtkext/gtkdockstation.c | 6 | ||||
-rw-r--r-- | src/panels/registers.c | 8 |
7 files changed, 33 insertions, 30 deletions
@@ -1,3 +1,13 @@ +15-01-08 Cyrille Bagard <nocbos@gmail.com> + + * src/dialogs/about.c: + * src/dialogs/plugins.c: + * src/dialogs/shellcode.c: + * src/gtkext/easygtk.c: + * src/gtkext/gtkdockstation.c: + * src/panels/registers.c: + Remove deprecation warnings about gtk_misc_set_alignment(). + 15-01-05 Cyrille Bagard <nocbos@gmail.com> * src/arch/vmpa.c: diff --git a/src/dialogs/about.c b/src/dialogs/about.c index 7f9c0e3..7ed38fd 100644 --- a/src/dialogs/about.c +++ b/src/dialogs/about.c @@ -126,7 +126,7 @@ GtkWidget *create_about_dialog(GtkWindow *parent) /* Copyright */ label = qck_create_label(NULL, NULL, "<span fgcolor='white'>Copyright (C) 2010-2014 Cyrille Bagard</span>"); - gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); + gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); gtk_fixed_put(GTK_FIXED(fixed), label, 0, 400); gtk_widget_set_size_request(label, 350, 20); diff --git a/src/dialogs/plugins.c b/src/dialogs/plugins.c index 4e7bfaf..93ea5ec 100644 --- a/src/dialogs/plugins.c +++ b/src/dialogs/plugins.c @@ -24,11 +24,15 @@ #include "plugins.h" +#include <i18n.h> + + +#include "../gtkext/easygtk.h" + -#define _(str) str @@ -76,11 +80,9 @@ GtkWidget *create_plugins_selection_dialog(GLoadedBinary *binary, GtkWindow *par GtkWidget *expander1; GtkWidget *hbox4; GtkWidget *vbox3; - GtkWidget *label5; + GtkWidget *label; /* Etiquette d'introduction */ GtkWidget *label8; - GtkWidget *label6; GtkWidget *label9; - GtkWidget *label7; GtkWidget *label10; GtkWidget *frame1; GtkWidget *alignment3; @@ -207,28 +209,25 @@ GtkWidget *create_plugins_selection_dialog(GLoadedBinary *binary, GtkWindow *par gtk_widget_show(vbox3); gtk_box_pack_start(GTK_BOX(hbox4), vbox3, TRUE, TRUE, 0); - label5 = gtk_label_new(_("Author:")); - gtk_widget_show(label5); - gtk_box_pack_start(GTK_BOX(vbox3), label5, FALSE, FALSE, 0); - gtk_misc_set_alignment(GTK_MISC(label5), 0, 0.5); + label = qck_create_label(NULL, NULL, _("Author:")); + gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(vbox3), label, FALSE, FALSE, 0); label8 = gtk_label_new(_("label8")); gtk_widget_show(label8); gtk_box_pack_start(GTK_BOX(vbox3), label8, FALSE, FALSE, 0); - label6 = gtk_label_new(_("Version:")); - gtk_widget_show(label6); - gtk_box_pack_start(GTK_BOX(vbox3), label6, FALSE, FALSE, 0); - gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5); + label = qck_create_label(NULL, NULL, _("Version:")); + gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(vbox3), label, FALSE, FALSE, 0); label9 = gtk_label_new(_("label9")); gtk_widget_show(label9); gtk_box_pack_start(GTK_BOX(vbox3), label9, FALSE, FALSE, 0); - label7 = gtk_label_new(_("URL:")); - gtk_widget_show(label7); - gtk_box_pack_start(GTK_BOX(vbox3), label7, FALSE, FALSE, 0); - gtk_misc_set_alignment(GTK_MISC(label7), 0, 0.5); + label = qck_create_label(NULL, NULL, _("URL:")); + gtk_widget_show(label); + gtk_box_pack_start(GTK_BOX(vbox3), label, FALSE, FALSE, 0); label10 = gtk_label_new(_("label10")); gtk_widget_show(label10); @@ -247,7 +246,6 @@ GtkWidget *create_plugins_selection_dialog(GLoadedBinary *binary, GtkWindow *par label12 = gtk_label_new(_("label12")); gtk_widget_show(label12); gtk_container_add(GTK_CONTAINER(alignment3), label12); - gtk_misc_set_alignment(GTK_MISC(label12), 0, 0); label11 = gtk_label_new(_("<b>Action</b>")); gtk_widget_show(label11); diff --git a/src/dialogs/shellcode.c b/src/dialogs/shellcode.c index 514386f..eb727b0 100644 --- a/src/dialogs/shellcode.c +++ b/src/dialogs/shellcode.c @@ -277,7 +277,7 @@ static void register_bincode_panel(GtkAssistant *assistant) /* Validation */ label = qck_create_label(G_OBJECT(assistant), "status", _("No code")); - gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5); + gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); /* Intégration */ diff --git a/src/gtkext/easygtk.c b/src/gtkext/easygtk.c index 1350b72..11e17a4 100644 --- a/src/gtkext/easygtk.c +++ b/src/gtkext/easygtk.c @@ -229,7 +229,8 @@ GtkWidget *qck_create_label(GObject *object, const char *name, const char *capti } gtk_widget_show(result); - gtk_misc_set_alignment(GTK_MISC(result), 0, 0.5); + gtk_widget_set_halign(result, GTK_ALIGN_START); + gtk_widget_set_valign(result, GTK_ALIGN_CENTER); return result; diff --git a/src/gtkext/gtkdockstation.c b/src/gtkext/gtkdockstation.c index 785ff42..2737557 100644 --- a/src/gtkext/gtkdockstation.c +++ b/src/gtkext/gtkdockstation.c @@ -120,11 +120,9 @@ static void gtk_dock_station_init(GtkDockStation *station) gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(eventbox), hbox); - station->title = GTK_LABEL(gtk_label_new(("<b>titre</b>"))); - gtk_widget_show(GTK_WIDGET(station->title)); + station->title = GTK_LABEL(qck_create_label(NULL, NULL, "<b>titre</b>")); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(station->title), TRUE, TRUE, 0); - gtk_label_set_use_markup(GTK_LABEL(station->title), TRUE); - gtk_misc_set_alignment(GTK_MISC(station->title), 0, 0.5); + gtk_label_set_use_markup(station->title, TRUE); button = gtk_button_new(); gtk_widget_show(button); diff --git a/src/panels/registers.c b/src/panels/registers.c index 184d247..4ad46ea 100644 --- a/src/panels/registers.c +++ b/src/panels/registers.c @@ -98,10 +98,8 @@ GtkWidget *build_registers_panel(void) gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(result), vbox1); - label1 = gtk_label_new (_("Registers:")); - gtk_widget_show (label1); + label1 = qck_create_label(NULL, NULL, _("Registers:")); gtk_box_pack_start (GTK_BOX (vbox1), label1, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); alignment = qck_create_padded_alignment(0, 0, 8, 0); @@ -177,10 +175,8 @@ GtkWidget *build_registers_panel(void) - label2 = gtk_label_new (_("Segments:")); - gtk_widget_show (label2); + label2 = qck_create_label(NULL, NULL, _("Segments:")); gtk_box_pack_start (GTK_BOX (vbox1), label2, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5); |