aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-01 10:03:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-01 10:05:37 +0800
commit4ce3d9c321888226b2bcbf67e189261d0edb5a53 (patch)
tree40f96a8968fa7bd956a5a72ab61b27ab5f7f0761 /widgets
parent1c198bd71100c3c0af0aa1d80bb0e1f51918c4f2 (diff)
downloadgsoc2013-evolution-4ce3d9c321888226b2bcbf67e189261d0edb5a53.tar
gsoc2013-evolution-4ce3d9c321888226b2bcbf67e189261d0edb5a53.tar.gz
gsoc2013-evolution-4ce3d9c321888226b2bcbf67e189261d0edb5a53.tar.bz2
gsoc2013-evolution-4ce3d9c321888226b2bcbf67e189261d0edb5a53.tar.lz
gsoc2013-evolution-4ce3d9c321888226b2bcbf67e189261d0edb5a53.tar.xz
gsoc2013-evolution-4ce3d9c321888226b2bcbf67e189261d0edb5a53.tar.zst
gsoc2013-evolution-4ce3d9c321888226b2bcbf67e189261d0edb5a53.zip
Bug 580892 – Kill libgnomeui/gnome-app and gnome-app-helper
The only remaining case is widgets/test/test-dropdown-button.c, but this file will be removed when the kill-bonobo branch is merged.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/test-calendar.c24
-rw-r--r--widgets/misc/test-dateedit.c30
-rw-r--r--widgets/misc/test-error.c4
-rw-r--r--widgets/misc/test-info-label.c22
-rw-r--r--widgets/misc/test-multi-config-dialog.c12
5 files changed, 40 insertions, 52 deletions
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 1906c70ede..117def6190 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -30,9 +30,6 @@
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
-
#include "e-calendar.h"
/* Drag and Drop stuff. */
@@ -61,21 +58,20 @@ delete_event_cb (GtkWidget *widget,
int
main (int argc, char **argv)
{
- GtkWidget *app;
+ GtkWidget *window;
GtkWidget *cal;
GtkWidget *vbox;
ECalendarItem *calitem;
- gnome_program_init (
- "test-calendar", "0.0", LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
+ gtk_init (&argc, &argv);
- app = gnome_app_new ("Test", "Test");
- gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
- gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
- gtk_container_set_border_width (GTK_CONTAINER (app), 8);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "ECalendar Test");
+ gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
+ gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
+ gtk_container_set_border_width (GTK_CONTAINER (window), 8);
- g_signal_connect (app, "delete_event",
+ g_signal_connect (window, "delete_event",
G_CALLBACK (delete_event_cb), NULL);
cal = e_calendar_new ();
@@ -99,8 +95,8 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX (vbox), cal, TRUE, TRUE, 0);
gtk_widget_show (vbox);
- gnome_app_set_contents (GNOME_APP (app), vbox);
- gtk_widget_show (app);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_widget_show (window);
gtk_main ();
diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c
index da6a5953b1..8c340ed45b 100644
--- a/widgets/misc/test-dateedit.c
+++ b/widgets/misc/test-dateedit.c
@@ -29,13 +29,11 @@
#endif
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-app.h>
#include "e-dateedit.h"
static void delete_event_cb (GtkWidget *widget,
GdkEventAny *event,
- GtkWidget *app);
+ GtkWidget *window);
static void on_get_date_clicked (GtkWidget *button,
EDateEdit *dedit);
static void on_toggle_24_hour_clicked (GtkWidget *button,
@@ -52,27 +50,29 @@ static void on_time_changed (EDateEdit *dedit,
int
main (int argc, char **argv)
{
- GtkWidget *app;
+ GtkWidget *window;
EDateEdit *dedit;
GtkWidget *table, *button;
- gnome_program_init ("test-dateedit", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL);
+ gtk_init (&argc, &argv);
puts ("here");
- app = gnome_app_new ("Test", "Test");
- gtk_window_set_default_size (GTK_WINDOW (app), 300, 200);
- gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
- gtk_container_set_border_width (GTK_CONTAINER (app), 8);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "EDateEdit Test");
+ gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
+ gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
+ gtk_container_set_border_width (GTK_CONTAINER (window), 8);
- g_signal_connect (app, "delete_event",
- G_CALLBACK (delete_event_cb), app);
+ g_signal_connect (window, "delete_event",
+ G_CALLBACK (delete_event_cb), window);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_widget_show (table);
- gnome_app_set_contents (GNOME_APP (app), table);
+
+ gtk_container_add (GTK_CONTAINER (window), table);
/* EDateEdit 1. */
dedit = E_DATE_EDIT (e_date_edit_new ());
@@ -160,7 +160,7 @@ main (int argc, char **argv)
g_signal_connect (button, "clicked",
G_CALLBACK (on_toggle_24_hour_clicked), dedit);
- gtk_widget_show (app);
+ gtk_widget_show (window);
gtk_main ();
@@ -171,9 +171,9 @@ main (int argc, char **argv)
static void
delete_event_cb (GtkWidget *widget,
GdkEventAny *event,
- GtkWidget *app)
+ GtkWidget *window)
{
- gtk_widget_destroy (app);
+ gtk_widget_destroy (window);
gtk_main_quit ();
}
diff --git a/widgets/misc/test-error.c b/widgets/misc/test-error.c
index 84abd76ce3..c8b442b23a 100644
--- a/widgets/misc/test-error.c
+++ b/widgets/misc/test-error.c
@@ -25,14 +25,12 @@
#include <config.h>
#endif
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#include "e-error.h"
int
main (int argc, char **argv)
{
- gnome_init ("test-error", "0.0", argc, argv);
+ gtk_init (&argc, &argv);
argc--;
switch (argc) {
diff --git a/widgets/misc/test-info-label.c b/widgets/misc/test-info-label.c
index fe7544350d..2ef47483ed 100644
--- a/widgets/misc/test-info-label.c
+++ b/widgets/misc/test-info-label.c
@@ -26,8 +26,6 @@
#endif
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#include "e-info-label.h"
static void
@@ -41,20 +39,20 @@ delete_event_cb (GtkWidget *widget,
int
main (int argc, char **argv)
{
- GtkWidget *app;
+ GtkWidget *window;
GtkWidget *info_label;
GtkWidget *label;
GtkWidget *vbox;
- gnome_program_init (
- "test-title-bar", "0.0", LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
+ gtk_init (&argc, &argv);
- app = gnome_app_new ("Test", "Test");
- gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
- gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "EInfoLabel Test");
+ gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
+ gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
- g_signal_connect (app, "delete_event", G_CALLBACK (delete_event_cb), NULL);
+ g_signal_connect (window, "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");
@@ -68,8 +66,8 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
gtk_widget_show (vbox);
- gnome_app_set_contents (GNOME_APP (app), vbox);
- gtk_widget_show (app);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_widget_show (window);
gtk_main ();
diff --git a/widgets/misc/test-multi-config-dialog.c b/widgets/misc/test-multi-config-dialog.c
index 28ed8d3eae..bc52f493c6 100644
--- a/widgets/misc/test-multi-config-dialog.c
+++ b/widgets/misc/test-multi-config-dialog.c
@@ -23,8 +23,6 @@
#include "e-multi-config-dialog.c"
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#define NUM_PAGES 10
@@ -77,15 +75,13 @@ main (int argc, char **argv)
{
GtkWidget *dialog;
- gnome_program_init (
- "test-multi-config-dialog", "0.0", LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
+ gtk_init (&argc, &argv);
dialog = e_multi_config_dialog_new ();
- gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300);
- g_signal_connect((dialog), "delete_event",
- G_CALLBACK (delete_event_callback), NULL);
+ g_signal_connect(
+ dialog, "delete-event",
+ G_CALLBACK (delete_event_callback), NULL);
add_pages (E_MULTI_CONFIG_DIALOG (dialog));