aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Garcia <agarcia@igalia.com>2008-06-10 11:24:32 +0000
committerAlberto Garcia <agarcia@igalia.com>2008-06-10 11:24:32 +0000
commit73d6262a23e40407faf6f99a44c00ee3f2deea46 (patch)
treef63ab999f56aa6f8a18277f6a0a5ae9b89672aab
parentbeb659f1070bfe202d7cdc1a41020a7691827a8b (diff)
* src/hildon-app-menu.h * src/hildon-app-menu.c * examples/hildon-app-menu-example.c Remove hildon_app_menu_popup(), use gtk_widget_show() instead
-rw-r--r--ChangeLog7
-rw-r--r--examples/hildon-app-menu-example.c2
-rw-r--r--src/hildon-app-menu.c27
-rw-r--r--src/hildon-app-menu.h3
4 files changed, 10 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 03af71c..685da59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-06-10 Alberto Garcia <agarcia@igalia.com>
+
+ * src/hildon-app-menu.h
+ * src/hildon-app-menu.c
+ * examples/hildon-app-menu-example.c
+ Remove hildon_app_menu_popup(), use gtk_widget_show() instead
+
2008-06-09 Alberto Garcia <agarcia@igalia.com>
* src/hildon-note.c
diff --git a/examples/hildon-app-menu-example.c b/examples/hildon-app-menu-example.c
index 4a4d349..c7c3c92 100644
--- a/examples/hildon-app-menu-example.c
+++ b/examples/hildon-app-menu-example.c
@@ -87,7 +87,7 @@ static void
button_clicked (GtkButton *button,
HildonAppMenu *menu)
{
- hildon_app_menu_popup (menu);
+ gtk_widget_show (menu);
}
static void
diff --git a/src/hildon-app-menu.c b/src/hildon-app-menu.c
index 0c84211..40c8deb 100644
--- a/src/hildon-app-menu.c
+++ b/src/hildon-app-menu.c
@@ -65,8 +65,8 @@
* g_signal_connect (filter, "clicked", G_CALLBACK (filter_three_clicked), userdata);
* hildon_app_menu_add_filter (menu, GTK_BUTTON (filter), filtergroup);
* <!-- -->
- * // Pop the menu up
- * hildon_app_menu_popup (menu);
+ * // Show the menu
+ * gtk_widget_show (menu);
* </programlisting>
* </example>
*
@@ -216,29 +216,6 @@ hildon_app_menu_get_group_from_filter (HildonAppMenu *menu,
return result;
}
-/**
- * hildon_app_menu_popup
- * @menu : A @HildonAppMenu
- *
- * Displays the @HildonAppMenu on top of the screen
- */
-void
-hildon_app_menu_popup (HildonAppMenu *menu)
-{
- g_return_if_fail (HILDON_IS_APP_MENU (menu));
- int x, xpos;
- GtkRequisition req;
- GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (menu));
-
- /* Position the menu in the top center of the screen */
- gtk_window_get_default_size (GTK_WINDOW (menu), &x, NULL);
- gtk_widget_size_request (GTK_WIDGET (menu), &req);
- xpos = (gdk_screen_get_width (screen) - MAX(x, req.width)) / 2;
- gtk_window_move (GTK_WINDOW (menu), xpos, 0);
-
- gtk_widget_show (GTK_WIDGET (menu));
-}
-
static void
hildon_app_menu_map (GtkWidget *widget)
{
diff --git a/src/hildon-app-menu.h b/src/hildon-app-menu.h
index 9c0a84a..7b387c9 100644
--- a/src/hildon-app-menu.h
+++ b/src/hildon-app-menu.h
@@ -77,9 +77,6 @@ GtkWidget *
hildon_app_menu_get_group_from_filter (HildonAppMenu *menu,
GtkButton *filter);
-void
-hildon_app_menu_popup (HildonAppMenu *menu);
-
G_END_DECLS
#endif /* __HILDON_APP_MENU_H__ */