aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2008-06-04 02:35:02 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2008-06-04 02:35:02 +0800
commit64b15c5cb7c8d2987e7f8f3c356f7612836a955d (patch)
treea5f45fa3c7790d05e67a315dccea1c729697c08e /widgets
parent1986408a1eccdf098ad8d55b552d8e0831ef27fb (diff)
downloadgsoc2013-evolution-64b15c5cb7c8d2987e7f8f3c356f7612836a955d.tar.gz
gsoc2013-evolution-64b15c5cb7c8d2987e7f8f3c356f7612836a955d.tar.zst
gsoc2013-evolution-64b15c5cb7c8d2987e7f8f3c356f7612836a955d.zip
Migrate from gtk_window_set_policy() to gtk_window_set_resizable() and
2008-06-03 Kjartan Maraas <kmaraas@gnome.org> * e-cell-date-edit.c: (e_cell_date_edit_init): * e-dateedit.c: (create_children): * e-multi-config-dialog.c: (e_multi_config_dialog_init): * e-unicode.h: * test-calendar.c: (main): * test-dateedit.c: (main): * test-info-label.c: (main): Migrate from gtk_window_set_policy() to gtk_window_set_resizable() and clean up a bunch of coding style issues along the way. svn path=/trunk/; revision=35584
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog12
-rw-r--r--widgets/misc/e-cell-date-edit.c3
-rw-r--r--widgets/misc/e-dateedit.c3
-rw-r--r--widgets/misc/e-multi-config-dialog.c6
-rw-r--r--widgets/misc/e-unicode.h5
-rw-r--r--widgets/misc/test-calendar.c16
-rw-r--r--widgets/misc/test-dateedit.c58
-rw-r--r--widgets/misc/test-info-label.c4
8 files changed, 55 insertions, 52 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 1a6f18d7d0..66b373f191 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,15 @@
+2008-06-03 Kjartan Maraas <kmaraas@gnome.org>
+
+ * e-cell-date-edit.c: (e_cell_date_edit_init):
+ * e-dateedit.c: (create_children):
+ * e-multi-config-dialog.c: (e_multi_config_dialog_init):
+ * e-unicode.h:
+ * test-calendar.c: (main):
+ * test-dateedit.c: (main):
+ * test-info-label.c: (main):
+ Migrate from gtk_window_set_policy() to gtk_window_set_resizable()
+ and clean up a bunch of coding style issues along the way.
+
2008-05-28 Milan Crha <mcrha@redhat.com>
** Fix for bug #532597
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index e54d5581f4..795bf9e12c 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -233,8 +233,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
gtk_window_set_type_hint (GTK_WINDOW (ecde->popup_window),
GDK_WINDOW_TYPE_HINT_COMBO);
- gtk_window_set_policy (GTK_WINDOW (ecde->popup_window),
- TRUE, TRUE, FALSE);
+ gtk_window_set_resizable (GTK_WINDOW (ecde->popup_window), TRUE);
frame = gtk_frame_new (NULL);
gtk_container_add (GTK_CONTAINER (ecde->popup_window), frame);
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index ca3c683cbe..4c982f3d3c 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -451,8 +451,7 @@ create_children (EDateEdit *dedit)
g_signal_connect (priv->cal_popup, "button_press_event",
G_CALLBACK (on_date_popup_button_press),
dedit);
- gtk_window_set_policy (GTK_WINDOW (priv->cal_popup),
- FALSE, FALSE, TRUE);
+ gtk_window_set_resizable (GTK_WINDOW (priv->cal_popup), TRUE);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c
index 6ebc66239c..762b87bc77 100644
--- a/widgets/misc/e-multi-config-dialog.c
+++ b/widgets/misc/e-multi-config-dialog.c
@@ -300,11 +300,7 @@ e_multi_config_dialog_init (EMultiConfigDialog *multi_config_dialog)
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (multi_config_dialog), GTK_RESPONSE_OK);
-
- gtk_window_set_policy (GTK_WINDOW (multi_config_dialog),
- FALSE /* allow_shrink */,
- TRUE /* allow_grow */,
- FALSE /* auto_shrink */);
+ gtk_window_set_resizable (GTK_WINDOW (multi_config_dialog), TRUE);
priv = g_new (EMultiConfigDialogPrivate, 1);
priv->pages = NULL;
diff --git a/widgets/misc/e-unicode.h b/widgets/misc/e-unicode.h
index f7fd036312..fb56dbc78a 100644
--- a/widgets/misc/e-unicode.h
+++ b/widgets/misc/e-unicode.h
@@ -26,10 +26,7 @@
#include <sys/types.h>
#include <glib.h>
-#include <gtk/gtkclist.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
#include <libxml/tree.h>
#include <iconv.h>
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 05fd2bb0e8..1021905f16 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -42,9 +42,11 @@
enum {
TARGET_SHORTCUT
};
+
static GtkTargetEntry target_table[] = {
{ "E-SHORTCUT", 0, TARGET_SHORTCUT }
};
+
static guint n_targets = sizeof(target_table) / sizeof(target_table[0]);
@@ -73,21 +75,21 @@ main (int argc, char **argv)
app = gnome_app_new ("Test", "Test");
gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
- gtk_window_set_policy (GTK_WINDOW (app), FALSE, TRUE, FALSE);
+ gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (app), 8);
- g_signal_connect((app), "delete_event",
- G_CALLBACK (delete_event_cb), NULL);
+ g_signal_connect (app, "delete_event",
+ G_CALLBACK (delete_event_cb), NULL);
cal = e_calendar_new ();
e_calendar_set_minimum_size (E_CALENDAR (cal), 1, 1);
calitem = E_CALENDAR (cal)->calitem;
gtk_widget_show (cal);
- g_signal_connect((calitem), "date_range_changed",
- G_CALLBACK (on_date_range_changed), NULL);
- g_signal_connect((calitem), "selection_changed",
- G_CALLBACK (on_selection_changed), NULL);
+ g_signal_connect (calitem, "date_range_changed",
+ G_CALLBACK (on_date_range_changed), NULL);
+ g_signal_connect (calitem, "selection_changed",
+ G_CALLBACK (on_selection_changed), NULL);
gtk_drag_dest_set (cal,
diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c
index 95b9cb99be..f5017c223c 100644
--- a/widgets/misc/test-dateedit.c
+++ b/widgets/misc/test-dateedit.c
@@ -67,11 +67,11 @@ main (int argc, char **argv)
app = gnome_app_new ("Test", "Test");
gtk_window_set_default_size (GTK_WINDOW (app), 300, 200);
- gtk_window_set_policy (GTK_WINDOW (app), FALSE, TRUE, TRUE);
+ gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (app), 8);
- g_signal_connect((app), "delete_event",
- G_CALLBACK (delete_event_cb), app);
+ g_signal_connect (app, "delete_event",
+ G_CALLBACK (delete_event_cb), app);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
@@ -81,17 +81,17 @@ main (int argc, char **argv)
/* EDateEdit 1. */
dedit = E_DATE_EDIT (e_date_edit_new ());
- gtk_table_attach (GTK_TABLE (table), (GtkWidget*) dedit,
+ gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (dedit),
0, 1, 0, 1, GTK_FILL, GTK_EXPAND, 0, 0);
- gtk_widget_show ((GtkWidget*) (dedit));
+ gtk_widget_show (GTK_WIDGET (dedit));
#if 0
- g_signal_connect((dedit), "date_changed",
- G_CALLBACK (on_date_changed), "1");
- g_signal_connect((dedit), "time_changed",
- G_CALLBACK (on_time_changed), "1");
+ g_signal_connect (dedit, "date_changed",
+ G_CALLBACK (on_date_changed), "1");
+ g_signal_connect (dedit, "time_changed",
+ G_CALLBACK (on_time_changed), "1");
#else
- g_signal_connect((dedit), "changed",
+ g_signal_connect (dedit, "changed",
G_CALLBACK (on_changed), "1");
#endif
@@ -114,21 +114,21 @@ main (int argc, char **argv)
e_date_edit_set_show_time (dedit, FALSE);
#if 0
- g_signal_connect((dedit), "date_changed",
- G_CALLBACK (on_date_changed), "2");
- g_signal_connect((dedit), "time_changed",
- G_CALLBACK (on_time_changed), "2");
+ g_signal_connect (dedit, "date_changed",
+ G_CALLBACK (on_date_changed), "2");
+ g_signal_connect (dedit, "time_changed",
+ G_CALLBACK (on_time_changed), "2");
#else
- g_signal_connect((dedit), "changed",
- G_CALLBACK (on_changed), "2");
+ g_signal_connect (dedit, "changed",
+ G_CALLBACK (on_changed), "2");
#endif
button = gtk_button_new_with_label ("Print Date");
gtk_table_attach (GTK_TABLE (table), button,
1, 2, 1, 2, 0, 0, 0, 0);
gtk_widget_show (button);
- g_signal_connect((button), "clicked",
- G_CALLBACK (on_get_date_clicked), dedit);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (on_get_date_clicked), dedit);
/* EDateEdit 3. */
dedit = E_DATE_EDIT (e_date_edit_new ());
@@ -142,29 +142,28 @@ main (int argc, char **argv)
e_date_edit_set_allow_no_date_set (dedit, TRUE);
#if 0
- g_signal_connect((dedit), "date_changed",
- G_CALLBACK (on_date_changed), "3");
- g_signal_connect((dedit), "time_changed",
- G_CALLBACK (on_time_changed), "3");
+ g_signal_connect (dedit, "date_changed",
+ G_CALLBACK (on_date_changed), "3");
+ g_signal_connect (dedit, "time_changed",
+ G_CALLBACK (on_time_changed), "3");
#else
- g_signal_connect((dedit), "changed",
- G_CALLBACK (on_changed), "3");
+ g_signal_connect (dedit, "changed",
+ G_CALLBACK (on_changed), "3");
#endif
button = gtk_button_new_with_label ("Print Date");
gtk_table_attach (GTK_TABLE (table), button,
1, 2, 2, 3, 0, 0, 0, 0);
gtk_widget_show (button);
- g_signal_connect((button), "clicked",
- G_CALLBACK (on_get_date_clicked), dedit);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (on_get_date_clicked), dedit);
button = gtk_button_new_with_label ("Toggle 24-hour");
gtk_table_attach (GTK_TABLE (table), button,
2, 3, 2, 3, 0, 0, 0, 0);
gtk_widget_show (button);
- g_signal_connect((button), "clicked",
- G_CALLBACK (on_toggle_24_hour_clicked),
- dedit);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (on_toggle_24_hour_clicked), dedit);
gtk_widget_show (app);
@@ -282,4 +281,3 @@ on_changed (EDateEdit *dedit,
}
}
-
diff --git a/widgets/misc/test-info-label.c b/widgets/misc/test-info-label.c
index c47e02c5a0..1557a27889 100644
--- a/widgets/misc/test-info-label.c
+++ b/widgets/misc/test-info-label.c
@@ -58,9 +58,9 @@ main (int argc, char **argv)
app = gnome_app_new ("Test", "Test");
gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
- gtk_window_set_policy (GTK_WINDOW (app), FALSE, TRUE, FALSE);
+ gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
- g_signal_connect((app), "delete_event", G_CALLBACK (delete_event_cb), NULL);
+ g_signal_connect (app, "delete_event", G_CALLBACK (delete_event_cb), NULL);
info_label = e_info_label_new ("stock_default-folder");
e_info_label_set_info ((EInfoLabel *) info_label, "Component Name", "An annoyingly long component message");