[epiphany] Make ephy_window_get_ui_manager return a GtkUIManager, not a GObject
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Make ephy_window_get_ui_manager return a GtkUIManager, not a GObject
- Date: Fri, 20 Jan 2012 19:33:53 +0000 (UTC)
commit 1bd50c7c0b96ff320f6265ca62f682f7d15755d6
Author: Xan Lopez <xan igalia com>
Date: Fri Jan 20 20:32:37 2012 +0100
Make ephy_window_get_ui_manager return a GtkUIManager, not a GObject
No clue why it was doing that, but seems pointless. I wish I could
make it private but it's used all over the place.
src/bookmarks/ephy-bookmarks-ui.c | 8 ++++----
src/ephy-encoding-menu.c | 14 +++++++-------
src/ephy-page-menu-action.c | 2 +-
src/ephy-window.c | 4 ++--
src/ephy-window.h | 2 +-
5 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c
index 994b322..8cfe150 100644
--- a/src/bookmarks/ephy-bookmarks-ui.c
+++ b/src/bookmarks/ephy-bookmarks-ui.c
@@ -87,7 +87,7 @@ activate_bookmarks_menu (GtkAction *action, EphyWindow *window)
BookmarksWindowData *data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
if (data && !data->bookmarks_menu)
{
- GtkUIManager *manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
+ GtkUIManager *manager = ephy_window_get_ui_manager (window);
gtk_ui_manager_ensure_update (manager);
if (!bookmarks_menu_string->len)
@@ -111,7 +111,7 @@ erase_bookmarks_menu (EphyWindow *window)
BookmarksWindowData *data;
GtkUIManager *manager;
- manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
+ manager = ephy_window_get_ui_manager (window);
data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
if (data != NULL && data->bookmarks_menu != 0)
@@ -177,7 +177,7 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
g_return_if_fail (data == NULL);
- manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
+ manager = ephy_window_get_ui_manager (window);
data = g_new0 (BookmarksWindowData, 1);
g_object_set_data_full (G_OBJECT (window), BM_WINDOW_DATA_KEY, data, g_free);
@@ -245,7 +245,7 @@ ephy_bookmarks_ui_detach_window (EphyWindow *window)
EphyNode *topics = ephy_bookmarks_get_keywords (eb);
BookmarksWindowData *data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
- GtkUIManager *manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
+ GtkUIManager *manager = ephy_window_get_ui_manager (window);
GtkAction *action;
g_return_if_fail (data != 0);
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c
index 4fa7abe..b55e398 100644
--- a/src/ephy-encoding-menu.c
+++ b/src/ephy-encoding-menu.c
@@ -21,19 +21,19 @@
*/
#include "config.h"
-
#include "ephy-encoding-menu.h"
-#include "ephy-encoding-dialog.h"
-#include "ephy-encodings.h"
-#include "ephy-embed.h"
+
+#include "ephy-debug.h"
#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-utils.h"
+#include "ephy-embed.h"
+#include "ephy-encoding-dialog.h"
+#include "ephy-encodings.h"
#include "ephy-shell.h"
-#include "ephy-debug.h"
-#include <gtk/gtk.h>
#include <glib/gi18n.h>
+#include <gtk/gtk.h>
#include <string.h>
#include <webkit/webkit.h>
@@ -351,7 +351,7 @@ ephy_encoding_menu_set_window (EphyEncodingMenu *menu, EphyWindow *window)
g_return_if_fail (EPHY_IS_WINDOW (window));
menu->priv->window = window;
- menu->priv->manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
+ menu->priv->manager = ephy_window_get_ui_manager (window);
action_group = gtk_action_group_new ("EncodingActions");
gtk_action_group_set_translation_domain (action_group, NULL);
diff --git a/src/ephy-page-menu-action.c b/src/ephy-page-menu-action.c
index 3faddd2..e50ceab 100644
--- a/src/ephy-page-menu-action.c
+++ b/src/ephy-page-menu-action.c
@@ -95,7 +95,7 @@ button_press_cb (GtkWidget *button, GdkEventButton *event, EphyPageMenuAction *a
if (!action->priv->menu) {
window = ephy_window_action_get_window (EPHY_WINDOW_ACTION (action));
- manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
+ manager = ephy_window_get_ui_manager (window);
menu = gtk_ui_manager_get_widget (manager, "/ui/PagePopup");
g_signal_connect (menu, "notify::visible",
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 8cfa995..d5655ec 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3946,12 +3946,12 @@ ephy_window_new_with_chrome (EphyWebViewChrome chrome,
*
* Return value: (transfer none): an #GtkUIManager
**/
-GObject *
+GtkUIManager *
ephy_window_get_ui_manager (EphyWindow *window)
{
g_return_val_if_fail (EPHY_IS_WINDOW (window), NULL);
- return G_OBJECT (window->priv->manager);
+ return window->priv->manager;
}
/**
diff --git a/src/ephy-window.h b/src/ephy-window.h
index 79ebe0e..ef66efa 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -62,7 +62,7 @@ EphyWindow *ephy_window_new (void);
EphyWindow *ephy_window_new_with_chrome (EphyWebViewChrome chrome,
gboolean is_popup);
-GObject *ephy_window_get_ui_manager (EphyWindow *window);
+GtkUIManager *ephy_window_get_ui_manager (EphyWindow *window);
GtkWidget *ephy_window_get_notebook (EphyWindow *window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]