aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>2000-01-07 08:30:34 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-07 08:30:34 +0800
commitdcc0e7dcde8da960d0b51f49d2e02458f185058f (patch)
treec717057890a5be4ccf31815bf2c4dd05b1ed08dd /e-util
parent6653d771b6ca764fdf7abdfa5c694b2d9df84585 (diff)
downloadgsoc2013-evolution-dcc0e7dcde8da960d0b51f49d2e02458f185058f.tar.gz
gsoc2013-evolution-dcc0e7dcde8da960d0b51f49d2e02458f185058f.tar.zst
gsoc2013-evolution-dcc0e7dcde8da960d0b51f49d2e02458f185058f.zip
More missing files
svn path=/trunk/; revision=1541
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-gui-utils.c58
-rw-r--r--e-util/e-gui-utils.h12
2 files changed, 70 insertions, 0 deletions
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
new file mode 100644
index 0000000000..7d9f4d49d9
--- /dev/null
+++ b/e-util/e-gui-utils.c
@@ -0,0 +1,58 @@
+/*
+ * GUI utility functions
+ *
+ * Author:
+ * Miguel de Icaza (miguel@helixcode.com)
+ *
+ * (C) 1999 Miguel de Icaza
+ * (C) 2000 Helix Code, Inc.
+ */
+#include <config.h>
+#include <gtk/gtksignal.h>
+#include <libgnomeui/gnome-messagebox.h>
+#include <libgnomeui/gnome-stock.h>
+#include "e-gui-utils.h"
+
+void
+e_notice (GtkWindow *window, const char *type, const char *str)
+{
+ GtkWidget *dialog;
+
+ dialog = gnome_message_box_new (str, type, GNOME_STOCK_BUTTON_OK, NULL);
+
+ if (window)
+ gnome_dialog_set_parent (GNOME_DIALOG (dialog), window);
+
+ gnome_dialog_run (GNOME_DIALOG (dialog));
+}
+
+static void
+kill_popup_menu (GtkWidget *widget, GtkMenu *menu)
+{
+ g_return_if_fail (menu != NULL);
+ g_return_if_fail (GTK_IS_MENU (menu));
+
+ gtk_object_unref (GTK_OBJECT (menu));
+}
+
+void
+e_auto_kill_popup_menu_on_hide (GtkMenu *menu)
+{
+ g_return_if_fail (menu != NULL);
+ g_return_if_fail (GTK_IS_MENU (menu));
+
+ gtk_signal_connect (GTK_OBJECT (menu), "hide",
+ GTK_SIGNAL_FUNC (kill_popup_menu), menu);
+}
+
+void
+e_popup_menu (GtkMenu *menu, GdkEventButton *event)
+{
+ g_return_if_fail (menu != NULL);
+ g_return_if_fail (GTK_IS_MENU (menu));
+
+ e_auto_kill_popup_menu_on_hide (menu);
+ gtk_menu_popup (menu, NULL, NULL, 0, NULL, event->button, event->time);
+}
+
+
diff --git a/e-util/e-gui-utils.h b/e-util/e-gui-utils.h
new file mode 100644
index 0000000000..95b8f0b5a1
--- /dev/null
+++ b/e-util/e-gui-utils.h
@@ -0,0 +1,12 @@
+#ifndef E_GUI_UTILS_H
+#define E_GUI_UTILS_H
+
+#include <gtk/gtkmenu.h>
+#include <gtk/gtkwindow.h>
+
+void e_popup_menu (GtkMenu *menu, GdkEventButton *event);
+void e_auto_kill_popup_menu_on_hide (GtkMenu *menu);
+void e_notice (GtkWindow *window, const char *type, const char *str);
+
+
+#endif /* E_GUI_UTILS_H */
ainereadler2015-12-141-1/+1 * Drop 8 support.mat2015-10-151-2/+0 * Convert ports to use the options helpers in categories [abc]*, and minor fixes.mat2015-08-191-11/+8 * Remove redudant @execbapt2015-01-201-4/+0 * Cleanup plistbapt2014-10-201-304/+0 * Update CentOS base to 6.5, add userland portsxmj2014-09-222-8/+31 * Remove support for pkg_installbapt2014-09-011-5/+0 * Seems pre-su-install breaks building as user now - in this case we onlynox2014-05-211-0/+2 * - Switch to USE_LINUX_APPS= curl instead of shipped libcurl, thisnox2014-01-302-2/+3 * - Switch to USES= shared-mime-info desktop-file-utils.nox2014-01-272-17/+14 * Sync RESTRICTED with what's in LEGAL.nox2013-12-121-1/+1 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-201-0/+1 * - Convert to new Uses/perl5.mk frameworkaz2013-07-311-6/+2 * - Finish removal of support for Linux 2.4 in bsd.linux-apps.mk andrene2013-05-301-8/+0 * - Update to 6.0.3.2197, adding a fix [1] for 9.x crashes.nox2013-04-213-348/+54 * Fix typos in COMMENTcs2012-07-251-1/+1 * Fix plist.nox2012-04-142-2/+1 * - The old version is 5.2.1.1588 actually (have I really used the wrongnox2012-02-013-47/+344 * - Go back to previous version, 6.0.3.2197, as the new one, 6.2.0.5905,nox2012-01-306-120/+653 * Update to 6.1.0.5001 (which unfortunately still crashes on >= 9.0/amd64 ):nox2012-01-196-652/+119 * Mark BROKEN on >= 9.x/amd64:nox2011-12-031-0/+4 * - remove maintainer tags from pkg-descreadler2011-10-231-3/+0 * Chase updated distfile, at 6.0.3.2197 now.nox2011-05-262-3/+3 * Update to 6.0.2.2074 .nox2011-04-043-3/+4 * Add back PORTEPOCH. (that for some reason I misread as PORTREVISIONnox2010-12-181-0/+1 * Update to 6.0.1.2032 (which is the current version again, looks like thenox2010-12-184-491/+105 * Go back to 5.1.3535.3218 for the time being, the new version, 5.2.1.1547,nox2010-08-173-53/+137 * Chase updated distfile, at 5.2.1.1329 now.nox2010-06-203-135/+52 * - Chase updated distfile, at 5.1.3535.3218 now. [1]nox2010-05-186-14/+47 * Fix build for nonstandard PREFIX / LOCALBASE.nox2010-05-132-3/+3 * Chase updated distfile, at 5.1.3533.1731 now.nox2009-11-272-4/+4 * Put back previous Linux version check, this time with proper braces. (duh!)nox2009-10-211-4/+4 * Comment out last commit to fix INDEX-8.linimon2009-10-201-4/+4 * Add a conditional IGNORE so people using a too old Linux base get anox2009-10-201-0/+8 * Chase updated distfile, at 5.1.3509.4636 now.nox2009-09-252-4/+4 * Chase updated distfile, at 5.1.3506.3999 now.nox2009-09-113-371/+120