[baobab/wip/vala: 6/45] Remove deprecated Gtk calls from baobab-chart
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/wip/vala: 6/45] Remove deprecated Gtk calls from baobab-chart
- Date: Sun, 29 Jan 2012 14:44:04 +0000 (UTC)
commit 169a604e56a42140a5f2887028c0db5513465c92
Author: Paolo Borelli <pborelli gnome org>
Date: Thu Jan 5 18:37:18 2012 +0100
Remove deprecated Gtk calls from baobab-chart
Remove V/HBox and unneeded GtkStyle calls.
src/baobab-chart.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/baobab-chart.c b/src/baobab-chart.c
index 9d102c8..2d9ec77 100644
--- a/src/baobab-chart.c
+++ b/src/baobab-chart.c
@@ -302,6 +302,7 @@ baobab_chart_realize (GtkWidget *widget)
gint attributes_mask;
GtkAllocation allocation;
GdkWindow *window;
+ GtkStyleContext *context;
g_return_if_fail (BAOBAB_IS_CHART (widget));
@@ -327,10 +328,8 @@ baobab_chart_realize (GtkWidget *widget)
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, chart);
- gtk_widget_style_attach (widget);
- gtk_style_set_background (gtk_widget_get_style (widget),
- window,
- GTK_STATE_NORMAL);
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_set_background (context, window);
gtk_widget_add_events (widget,
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK |
@@ -1719,11 +1718,11 @@ baobab_chart_save_snapshot (GtkWidget *chart)
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (fs_dlg), TRUE);
/* extra widget */
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (fs_dlg), vbox);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 6);
label = gtk_label_new_with_mnemonic (_("_Image type:"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]