aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-03-25 04:56:19 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-03-25 04:56:19 +0800
commit5edfc6d1d2c7ba42be2463c1609b8c1482e32799 (patch)
tree74388ceb578125708c7e76af034e58e2de381206 /src/bookmarks
parent53a85cd93b24a7fd98a7ae205fd9e20a4d54e71a (diff)
downloadgsoc2013-epiphany-5edfc6d1d2c7ba42be2463c1609b8c1482e32799.tar.gz
gsoc2013-epiphany-5edfc6d1d2c7ba42be2463c1609b8c1482e32799.tar.zst
gsoc2013-epiphany-5edfc6d1d2c7ba42be2463c1609b8c1482e32799.zip
Dont put special keywords in the topics list. Use ephy-state for size of
2003-03-24 Marco Pesenti Gritti <marco@it.gnome.org> * src/bookmarks/ephy-bookmark-properties.c: (build_ui): * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_construct): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_init): * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_construct): * src/bookmarks/ephy-topics-selector.c: (fill_model): * src/bookmarks/ephy-tree-model-node.c: (ephy_tree_model_node_get_value): * src/bookmarks/ephy-tree-model-node.h: Dont put special keywords in the topics list. Use ephy-state for size of all bookmarks dialogs.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmark-properties.c6
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c12
-rw-r--r--src/bookmarks/ephy-bookmarks.c4
-rw-r--r--src/bookmarks/ephy-bookmarks.h7
-rw-r--r--src/bookmarks/ephy-new-bookmark.c13
-rw-r--r--src/bookmarks/ephy-topics-selector.c7
-rw-r--r--src/bookmarks/ephy-tree-model-node.c10
-rw-r--r--src/bookmarks/ephy-tree-model-node.h7
8 files changed, 41 insertions, 25 deletions
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 4b70b2e6b..448d8a660 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -285,7 +285,11 @@ build_ui (EphyBookmarkProperties *editor)
"response",
G_CALLBACK (bookmark_properties_response_cb),
editor);
-
+
+ ephy_state_add_window (GTK_WIDGET(editor),
+ "bookmark_properties",
+ 290, 280);
+
update_window_title (editor);
set_window_icon (editor);
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 558469981..b4cc80a16 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -39,6 +39,7 @@
#include "egg-action-group.h"
#include "egg-menu-merge.h"
#include "popup-commands.h"
+#include "ephy-state.h"
static void ephy_bookmarks_editor_class_init (EphyBookmarksEditorClass *klass);
static void ephy_bookmarks_editor_init (EphyBookmarksEditor *editor);
@@ -570,8 +571,12 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
const char *icon_path;
int i;
+ ephy_state_add_window (GTK_WIDGET(editor),
+ "bookmarks_editor",
+ 450, 400);
+
gtk_window_set_title (GTK_WINDOW (editor), _("Bookmarks"));
-
+
icon_path = ephy_file ("epiphany-bookmarks.png");
gtk_window_set_icon_from_file (GTK_WINDOW (editor), icon_path, NULL);
@@ -595,8 +600,9 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
egg_menu_merge_insert_action_group (ui_merge,
action_group, 0);
egg_menu_merge_add_ui_from_file (ui_merge,
- ephy_file ("epiphany-bookmark-editor-ui.xml"),
- NULL);
+ ephy_file ("epiphany-bookmark-editor-ui.xml"),
+ NULL);
+ gtk_window_add_accel_group (GTK_WINDOW (editor), ui_merge->accel_group);
egg_menu_merge_ensure_update (ui_merge);
editor->priv->ui_merge = ui_merge;
editor->priv->action_group = action_group;
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 2051bb6f7..a5d978de4 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -446,7 +446,7 @@ ephy_bookmarks_init (EphyBookmarks *eb)
eb->priv->keywords = ephy_node_new_with_id (KEYWORDS_NODE_ID);
ephy_node_ref (eb->priv->keywords);
g_value_init (&value, G_TYPE_INT);
- g_value_set_int (&value, EPHY_TREE_MODEL_ALL_PRIORITY);
+ g_value_set_int (&value, EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY);
ephy_node_set_property (eb->priv->bookmarks,
EPHY_NODE_KEYWORD_PROP_PRIORITY,
&value);
@@ -475,7 +475,7 @@ ephy_bookmarks_init (EphyBookmarks *eb)
&value);
g_value_unset (&value);
g_value_init (&value, G_TYPE_INT);
- g_value_set_int (&value, EPHY_TREE_MODEL_SPECIAL_PRIORITY);
+ g_value_set_int (&value, EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY);
ephy_node_set_property (eb->priv->favorites,
EPHY_NODE_KEYWORD_PROP_PRIORITY,
&value);
diff --git a/src/bookmarks/ephy-bookmarks.h b/src/bookmarks/ephy-bookmarks.h
index 41382d9c0..4c521fa2d 100644
--- a/src/bookmarks/ephy-bookmarks.h
+++ b/src/bookmarks/ephy-bookmarks.h
@@ -47,6 +47,13 @@ enum
EPHY_NODE_KEYWORD_PROP_PRIORITY = 8
};
+typedef enum
+{
+ EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY,
+ EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY,
+ EPHY_BOOKMARKS_KEYWORD_NORMAL_PRIORITY
+} EphBookmarksKeywordPriority;
+
struct EphyBookmarks
{
GObject parent;
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index ac5c68c3f..116870c55 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -27,6 +27,7 @@
#include <libgnome/gnome-i18n.h>
#include "ephy-new-bookmark.h"
+#include "ephy-state.h"
#include "ephy-topics-selector.h"
#include "ephy-debug.h"
#include "ephy-stock-icons.h"
@@ -231,12 +232,16 @@ ephy_new_bookmark_construct (EphyNewBookmark *editor)
{
GdkPixbuf *icon;
+ ephy_state_add_window (GTK_WIDGET(editor),
+ "new_bookmark",
+ 280, 240);
+
gtk_window_set_title (GTK_WINDOW (editor),
_("New Bookmark"));
- icon = gtk_widget_render_icon (GTK_WIDGET (editor),
- EPHY_STOCK_BOOKMARK_PAGE,
- GTK_ICON_SIZE_MENU,
- NULL);
+ icon = gtk_widget_render_icon (GTK_WIDGET (editor),
+ EPHY_STOCK_BOOKMARK_PAGE,
+ GTK_ICON_SIZE_MENU,
+ NULL);
gtk_window_set_icon (GTK_WINDOW (editor), icon);
g_object_unref(icon);
diff --git a/src/bookmarks/ephy-topics-selector.c b/src/bookmarks/ephy-topics-selector.c
index 4ec6a32cc..4bfbe3681 100644
--- a/src/bookmarks/ephy-topics-selector.c
+++ b/src/bookmarks/ephy-topics-selector.c
@@ -203,7 +203,7 @@ fill_model (EphyTopicsSelector *editor)
EphyNode *kid;
const char *name;
gboolean has_keyword = FALSE;
- gboolean real_topic;
+ int priority;
GtkTreeIter iter;
kid = g_ptr_array_index (children, i);
@@ -218,10 +218,11 @@ fill_model (EphyTopicsSelector *editor)
editor->priv->bookmark);
}
- real_topic = !ephy_node_get_property_boolean
+ priority = ephy_node_get_property_int
(kid, EPHY_NODE_KEYWORD_PROP_PRIORITY);
+ if (priority == -1) priority = EPHY_BOOKMARKS_KEYWORD_NORMAL_PRIORITY;
- if (real_topic)
+ if (priority == EPHY_BOOKMARKS_KEYWORD_NORMAL_PRIORITY)
{
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
diff --git a/src/bookmarks/ephy-tree-model-node.c b/src/bookmarks/ephy-tree-model-node.c
index f1a6fe758..2cde33400 100644
--- a/src/bookmarks/ephy-tree-model-node.c
+++ b/src/bookmarks/ephy-tree-model-node.c
@@ -511,8 +511,8 @@ ephy_tree_model_node_get_value (GtkTreeModel *tree_model,
case EPHY_TREE_MODEL_NODE_COL_TITLE_WEIGHT:
g_value_init (value, G_TYPE_INT);
priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY);
- if (priority == EPHY_TREE_MODEL_ALL_PRIORITY ||
- priority == EPHY_TREE_MODEL_SPECIAL_PRIORITY)
+ if (priority == EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY ||
+ priority == EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY)
g_value_set_int (value, PANGO_WEIGHT_BOLD);
else
g_value_set_int (value, PANGO_WEIGHT_NORMAL);
@@ -520,11 +520,11 @@ ephy_tree_model_node_get_value (GtkTreeModel *tree_model,
case EPHY_TREE_MODEL_NODE_COL_PRIORITY:
g_value_init (value, G_TYPE_INT);
priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY);
- if (priority == EPHY_TREE_MODEL_ALL_PRIORITY ||
- priority == EPHY_TREE_MODEL_SPECIAL_PRIORITY)
+ if (priority == EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY ||
+ priority == EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY)
g_value_set_int (value, priority);
else
- g_value_set_int (value, EPHY_TREE_MODEL_NORMAL_PRIORITY);
+ g_value_set_int (value, EPHY_BOOKMARKS_KEYWORD_NORMAL_PRIORITY);
break;
default:
g_assert_not_reached ();
diff --git a/src/bookmarks/ephy-tree-model-node.h b/src/bookmarks/ephy-tree-model-node.h
index 94139e7e1..afc862f58 100644
--- a/src/bookmarks/ephy-tree-model-node.h
+++ b/src/bookmarks/ephy-tree-model-node.h
@@ -46,13 +46,6 @@ typedef enum
EPHY_TREE_MODEL_NODE_NUM_COLUMNS
} EphyTreeModelNodeColumn;
-typedef enum
-{
- EPHY_TREE_MODEL_ALL_PRIORITY,
- EPHY_TREE_MODEL_SPECIAL_PRIORITY,
- EPHY_TREE_MODEL_NORMAL_PRIORITY
-} EphyTreeModelNodePriority;
-
GType ephy_tree_model_node_column_get_type (void);
#define EPHY_TYPE_TREE_MODEL_NODE_COLUMN (ephy_tree_model_node_column_get_type ())