diff options
author | monsta <[email protected]> | 2016-01-19 21:29:20 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-01-19 21:29:20 +0300 |
commit | ee558357e177fa9b41aa2981cef641ed8a6c6f0f (patch) | |
tree | 8d63927b4ff7512e57b5199793767e8f5ec7ecaf /mate-window-picker-applet | |
parent | 1b3761aa805024182755debda9308ab99dc22695 (diff) | |
download | mate-netbook-ee558357e177fa9b41aa2981cef641ed8a6c6f0f.tar.bz2 mate-netbook-ee558357e177fa9b41aa2981cef641ed8a6c6f0f.tar.xz |
[GTK+3] window picker: fix deprecated usage of GtkMisc, GtkHBox, GtkVBox
Diffstat (limited to 'mate-window-picker-applet')
-rw-r--r-- | mate-window-picker-applet/applet.c | 16 | ||||
-rw-r--r-- | mate-window-picker-applet/task-list.c | 2 | ||||
-rw-r--r-- | mate-window-picker-applet/task-list.h | 4 | ||||
-rw-r--r-- | mate-window-picker-applet/task-title.c | 9 |
4 files changed, 28 insertions, 3 deletions
diff --git a/mate-window-picker-applet/applet.c b/mate-window-picker-applet/applet.c index 31dc6e2..d7478e7 100644 --- a/mate-window-picker-applet/applet.c +++ b/mate-window-picker-applet/applet.c @@ -161,7 +161,11 @@ cw_applet_fill (MatePanelApplet *applet, force_no_focus_padding (GTK_WIDGET (applet)); gtk_container_set_border_width (GTK_CONTAINER (applet), 0); +#if GTK_CHECK_VERSION (3, 0, 0) + eb = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); +#else eb = gtk_hbox_new (FALSE, 6); +#endif gtk_container_add (GTK_CONTAINER (applet), eb); gtk_container_set_border_width (GTK_CONTAINER (eb), 0); @@ -249,14 +253,22 @@ display_prefs_dialog (GtkAction *action, GDK_WINDOW_TYPE_HINT_DIALOG); gtk_container_set_border_width (GTK_CONTAINER (window), 12); +#if GTK_CHECK_VERSION (3, 0, 0) + box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); +#else box = gtk_vbox_new (FALSE, 8); +#endif gtk_container_add (GTK_CONTAINER (window), box); nb = gtk_notebook_new (); g_object_set (nb, "show-tabs", FALSE, "show-border", TRUE, NULL); gtk_box_pack_start (GTK_BOX (box), nb, TRUE, TRUE, 0); +#if GTK_CHECK_VERSION (3, 0, 0) + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); +#else vbox = gtk_vbox_new (FALSE, 8); +#endif gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); gtk_notebook_append_page (GTK_NOTEBOOK (nb), vbox, NULL); @@ -272,7 +284,11 @@ display_prefs_dialog (GtkAction *action, gtk_widget_set_size_request (nb, -1, 100); +#if GTK_CHECK_VERSION (3, 0, 0) + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +#else hbox = gtk_hbox_new (FALSE, 0); +#endif gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0); label = gtk_label_new (" "); diff --git a/mate-window-picker-applet/task-list.c b/mate-window-picker-applet/task-list.c index 137534c..459ad5a 100644 --- a/mate-window-picker-applet/task-list.c +++ b/mate-window-picker-applet/task-list.c @@ -23,7 +23,7 @@ #define WNCK_I_KNOW_THIS_IS_UNSTABLE #include <libwnck/libwnck.h> -G_DEFINE_TYPE (TaskList, task_list, GTK_TYPE_HBOX); +G_DEFINE_TYPE (TaskList, task_list, GTK_TYPE_BOX); #define TASK_LIST_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ TASK_TYPE_LIST, \ diff --git a/mate-window-picker-applet/task-list.h b/mate-window-picker-applet/task-list.h index 87698ba..58a7195 100644 --- a/mate-window-picker-applet/task-list.h +++ b/mate-window-picker-applet/task-list.h @@ -46,14 +46,14 @@ typedef struct _TaskListPrivate TaskListPrivate; struct _TaskList { - GtkHBox parent; + GtkBox parent; TaskListPrivate *priv; }; struct _TaskListClass { - GtkHBoxClass parent_class; + GtkBoxClass parent_class; }; GType task_list_get_type (void) G_GNUC_CONST; diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c index 955a2ac..9b47cbd 100644 --- a/mate-window-picker-applet/task-title.c +++ b/mate-window-picker-applet/task-title.c @@ -474,14 +474,23 @@ task_title_init (TaskTitle *title) 0, 0, 6, 6); gtk_container_add (GTK_CONTAINER (title), priv->align); +#if GTK_CHECK_VERSION (3, 0, 0) + priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); +#else priv->box = gtk_hbox_new (FALSE, 2); +#endif gtk_container_add (GTK_CONTAINER (priv->align), priv->box); gtk_widget_set_no_show_all (priv->box, TRUE); gtk_widget_show (priv->box); priv->label = gtk_label_new (_("Home")); gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_END); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (priv->label, GTK_ALIGN_START); + gtk_widget_set_valign (priv->label, GTK_ALIGN_CENTER); +#else gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5); +#endif PangoAttrList *attr_list = pango_attr_list_new (); PangoAttribute *attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); |