diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-08-10 22:17:23 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-08-10 22:17:23 +0200 |
commit | 4e2ff263b8fdffe1251c1db956a6682f10ee2943 (patch) | |
tree | 893f091b1b85ffea124dae3ecafc2eeca499db67 /example | |
parent | f062e19604a78481b88c2c2be3c93ac4cc4f4f93 (diff) | |
parent | 2ce8e4a7d8ed34a16e825c639129e92d8f0d05bd (diff) | |
download | ayatana-ido-4e2ff263b8fdffe1251c1db956a6682f10ee2943.tar.gz ayatana-ido-4e2ff263b8fdffe1251c1db956a6682f10ee2943.tar.bz2 ayatana-ido-4e2ff263b8fdffe1251c1db956a6682f10ee2943.zip |
Merge branch 'tari01-master'
Attributes GH PR #9: https://github.com/AyatanaIndicators/ayatana-ido/pull/9
Diffstat (limited to 'example')
-rw-r--r-- | example/Makefile.am | 16 | ||||
-rw-r--r-- | example/messagedialog.c | 59 |
2 files changed, 1 insertions, 74 deletions
diff --git a/example/Makefile.am b/example/Makefile.am index 1709835..d52ac1c 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -1,23 +1,11 @@ VER=3 noinst_PROGRAMS = \ - messagedialog \ menus -messagedialog_SOURCES = \ - messagedialog.c - menus_SOURCES = \ menus.c -messagedialog_CPPFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - $(GCC_FLAGS) \ - $(GTK_CFLAGS) \ - $(MAINTAINER_CFLAGS) - menus_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/src \ @@ -26,8 +14,6 @@ menus_CPPFLAGS = \ $(GTK_CFLAGS) \ $(MAINTAINER_CFLAGS) -messagedialog_LDADD = $(top_builddir)/src/libayatana-ido$(VER)-0.4.la $(GTK_LIBS) - menus_LDADD = $(top_builddir)/src/libayatana-ido$(VER)-0.4.la $(GTK_LIBS) -DISTCLEANFILES = Makefile.in
\ No newline at end of file +DISTCLEANFILES = Makefile.in diff --git a/example/messagedialog.c b/example/messagedialog.c deleted file mode 100644 index d9cfc21..0000000 --- a/example/messagedialog.c +++ /dev/null @@ -1,59 +0,0 @@ -#include <gtk/gtk.h> - -#include "idomessagedialog.h" -#include "config.h" - -static void -response_cb (GtkDialog *dialog, - gint response, - gpointer user_data) -{ - gtk_widget_destroy (GTK_WIDGET (dialog)); -} - -static void -button_clicked_cb (GtkWidget *button, gpointer data) -{ - GtkWidget *window = (GtkWidget *) data; - GtkWidget *dialog = ido_message_dialog_new (GTK_WINDOW (window), - GTK_DIALOG_MODAL, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_CLOSE, - "This is a test of the emergency broadcasting system"); - gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), - "If this had been an actual emergency, you'd be dead already"); - g_signal_connect (G_OBJECT (dialog), - "response", - G_CALLBACK (response_cb), NULL); - gtk_widget_show (dialog); -} - -int -main (int argc, char *argv[]) -{ - GtkWidget *window; - GtkWidget *vbox; - GtkWidget *button; - - gtk_init (&argc, &argv); - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), "Message Dialogs"); - g_signal_connect (window, "destroy", gtk_main_quit, NULL); - - vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - - gtk_container_add (GTK_CONTAINER (window), vbox); - - button = gtk_button_new_with_label ("Confirmation dialog"); - g_signal_connect (button, "clicked", - G_CALLBACK (button_clicked_cb), - window); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - - gtk_widget_show_all (window); - - gtk_main (); - - return 0; -} |