[epiphany-extensions] all: update to ephy-dialog API change
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany-extensions] all: update to ephy-dialog API change
- Date: Fri, 8 Oct 2010 15:54:05 +0000 (UTC)
commit d6d9e5d5abcf086f7647c5f8d953165127728306
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Fri Sep 3 04:47:11 2010 -0500
all: update to ephy-dialog API change
Bug #628752
.../actions/ephy-actions-extension-editor-dialog.c | 40 +----
.../ephy-actions-extension-properties-dialog.c | 54 +------
extensions/adblock/adblock-ui.c | 59 ++------
extensions/error-viewer/error-viewer.c | 20 +--
.../extensions-manager-ui/extensions-manager-ui.c | 20 +--
extensions/livehttpheaders/livehttpheaders-ui.c | 43 +----
extensions/page-info/page-info-dialog.c | 166 +++++---------------
extensions/rss/rss-ui.c | 31 +---
8 files changed, 84 insertions(+), 349 deletions(-)
---
diff --git a/extensions/actions/ephy-actions-extension-editor-dialog.c b/extensions/actions/ephy-actions-extension-editor-dialog.c
index a34d9b5..992b832 100644
--- a/extensions/actions/ephy-actions-extension-editor-dialog.c
+++ b/extensions/actions/ephy-actions-extension-editor-dialog.c
@@ -54,30 +54,6 @@ struct _EphyActionsExtensionEditorDialogPrivate
};
enum {
- PROP_ACTIONS_EDITOR,
-
- PROP_VIEW,
- PROP_SELECTION_COUNT_LABEL,
- PROP_ADD_BUTTON,
- PROP_REMOVE_BUTTON,
- PROP_PROPERTIES_BUTTON,
- PROP_CLOSE_BUTTON
-};
-
-static const
-EphyDialogProperty properties[] = {
- { "actions_editor", NULL, PT_NORMAL, 0 },
-
- { "view", NULL, PT_NORMAL, 0 },
- { "selection_count_label", NULL, PT_NORMAL, 0 },
- { "add_button", NULL, PT_NORMAL, 0 },
- { "remove_button", NULL, PT_NORMAL, 0 },
- { "properties_button", NULL, PT_NORMAL, 0 },
-
- { NULL }
-};
-
-enum {
COLUMN_NODE,
COLUMN_LABEL,
N_COLUMNS
@@ -389,19 +365,19 @@ ephy_actions_extension_editor_dialog_constructor
(dialog, GTK_STOCK_PROPERTIES,
G_CALLBACK(ephy_actions_extension_editor_dialog_edit_selected));
- ephy_dialog_construct (EPHY_DIALOG (dialog), properties,
+ ephy_dialog_construct (EPHY_DIALOG (dialog),
SHARE_DIR "/ui/actions-editor.ui",
- properties[PROP_ACTIONS_EDITOR].id,
+ "actions_editor",
GETTEXT_PACKAGE);
ephy_dialog_get_controls (
EPHY_DIALOG (dialog),
- properties[PROP_ACTIONS_EDITOR].id, &(dialog->priv->dialog),
- properties[PROP_VIEW].id, &(dialog->priv->view),
- properties[PROP_SELECTION_COUNT_LABEL].id, &(dialog->priv->selection_count_label),
- properties[PROP_REMOVE_BUTTON].id, &(dialog->priv->remove_button),
- properties[PROP_ADD_BUTTON].id, &(dialog->priv->add_button),
- properties[PROP_PROPERTIES_BUTTON].id, &(dialog->priv->properties_button),
+ "actions_editor", &(dialog->priv->dialog),
+ "view", &(dialog->priv->view),
+ "selection_count_label", &(dialog->priv->selection_count_label),
+ "remove_button", &(dialog->priv->remove_button),
+ "add_button", &(dialog->priv->add_button),
+ "properties_button", &(dialog->priv->properties_button),
NULL);
g_signal_connect (dialog->priv->properties_button, "clicked",
G_CALLBACK (ephy_actions_extension_editor_dialog_properties_clicked_cb),
diff --git a/extensions/actions/ephy-actions-extension-properties-dialog.c b/extensions/actions/ephy-actions-extension-properties-dialog.c
index 7a7a446..0d006f6 100644
--- a/extensions/actions/ephy-actions-extension-properties-dialog.c
+++ b/extensions/actions/ephy-actions-extension-properties-dialog.c
@@ -51,36 +51,6 @@ struct _EphyActionsExtensionPropertiesDialogPrivate
GType ephy_actions_extension_properties_dialog_type = 0;
static GObjectClass *parent_class = NULL;
-enum {
- PROP_ACTION_PROPERTIES,
-
- PROP_NAME_LABEL,
- PROP_DESCRIPTION_LABEL,
- PROP_COMMAND_LABEL,
-
- PROP_NAME_ENTRY,
- PROP_DESCRIPTION_ENTRY,
- PROP_COMMAND_ENTRY,
- PROP_APPLIES_TO_PAGES_CHECK,
- PROP_APPLIES_TO_IMAGES_CHECK
-};
-
-static const EphyDialogProperty properties[] = {
- { "action_properties", NULL, PT_NORMAL, 0 },
-
- { "name_label", NULL, PT_NORMAL, 0 },
- { "description_label", NULL, PT_NORMAL, 0 },
- { "command_label", NULL, PT_NORMAL, 0 },
-
- { "name_entry", NULL, PT_NORMAL, 0 },
- { "description_entry", NULL, PT_NORMAL, 0 },
- { "command_entry", NULL, PT_NORMAL, 0 },
- { "applies_to_pages_check", NULL, PT_NORMAL, 0 },
- { "applies_to_images_check", NULL, PT_NORMAL, 0 },
-
- { NULL }
-};
-
static void ephy_actions_extension_properties_dialog_class_init
(EphyActionsExtensionPropertiesDialogClass *class);
static void ephy_actions_extension_properties_dialog_init
@@ -267,9 +237,9 @@ ephy_actions_extension_properties_dialog_constructor
construct_params);
dialog = EPHY_ACTIONS_EXTENSION_PROPERTIES_DIALOG (object);
- ephy_dialog_construct (EPHY_DIALOG(dialog), properties,
+ ephy_dialog_construct (EPHY_DIALOG(dialog),
SHARE_DIR "/ui/action-properties.ui",
- properties[PROP_ACTION_PROPERTIES].id,
+ "action_properties",
GETTEXT_PACKAGE);
if (dialog->priv->action == NULL)
@@ -280,28 +250,22 @@ ephy_actions_extension_properties_dialog_constructor
}
ephy_dialog_get_controls (EPHY_DIALOG (dialog),
- properties[PROP_ACTION_PROPERTIES].id, &(dialog->priv->dialog),
- properties[PROP_NAME_ENTRY].id, &(dialog->priv->name_entry),
+ "action_properties", &(dialog->priv->dialog),
+ "name_entry", &(dialog->priv->name_entry),
NULL);
ephy_actions_extension_properties_dialog_link
(dialog,
-
- properties[PROP_NAME_ENTRY].id, "text",
+ "name_entry", "text",
EPHY_ACTIONS_EXTENSION_ACTION_PROP_NAME,
-
- properties[PROP_DESCRIPTION_ENTRY].id, "text",
+ "description_entry", "text",
EPHY_ACTIONS_EXTENSION_ACTION_PROP_DESCRIPTION,
-
- properties[PROP_COMMAND_ENTRY].id, "text",
+ "command_entry", "text",
EPHY_ACTIONS_EXTENSION_ACTION_PROP_COMMAND,
-
- properties[PROP_APPLIES_TO_PAGES_CHECK].id, "active",
+ "applies_to_pages_check", "active",
EPHY_ACTIONS_EXTENSION_ACTION_PROP_APPLIES_TO_PAGES,
-
- properties[PROP_APPLIES_TO_IMAGES_CHECK].id, "active",
+ "applies_to_images_check", "active",
EPHY_ACTIONS_EXTENSION_ACTION_PROP_APPLIES_TO_IMAGES,
-
NULL);
if (dialog->priv->add)
diff --git a/extensions/adblock/adblock-ui.c b/extensions/adblock/adblock-ui.c
index 92245f6..bdc29ae 100644
--- a/extensions/adblock/adblock-ui.c
+++ b/extensions/adblock/adblock-ui.c
@@ -140,40 +140,6 @@ enum
enum
{
- PROP_DIALOG,
- PROP_NOTEBOOK,
- PROP_WHITELIST,
- PROP_BLACKLIST,
- PROP_DEFAULTLIST,
- PROP_PATTERN,
- PROP_ADD,
- PROP_WHITE_SUPPR,
- PROP_BLACK_SUPPR,
- PROP_LOAD,
- PROP_LICENSE,
- PROP_ACTIONS
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { "adblock-ui", NULL, PT_NORMAL, 0 },
- { "notebook", NULL, PT_NORMAL, 0 },
- { "white_treeview", NULL, PT_NORMAL, 0 },
- { "black_treeview", NULL, PT_NORMAL, 0 },
- { "default_treeview", NULL, PT_NORMAL, 0 },
- { "pattern", NULL, PT_NORMAL, 0 },
- { "add", NULL, PT_NORMAL, 0 },
- { "white_suppr", NULL, PT_NORMAL, 0 },
- { "black_suppr", NULL, PT_NORMAL, 0 },
- { "load", NULL, PT_NORMAL, 0 },
- { "license", NULL, PT_NORMAL, 0 },
- { "action_rules_frame", NULL, PT_NORMAL, 0 },
- { NULL }
-};
-
-enum
-{
COL_PATTERN,
N_COLUMNS
};
@@ -386,21 +352,20 @@ adblock_ui_constructor (GType type,
priv = dialog->priv;
ephy_dialog_construct (EPHY_DIALOG (edialog),
- properties,
SHARE_DIR "/ui/adblock.ui",
"adblock-ui",
GETTEXT_PACKAGE);
ephy_dialog_get_controls (edialog,
- properties[PROP_DIALOG].id, &priv->dialog,
- properties[PROP_NOTEBOOK].id, &priv->notebook,
- properties[PROP_ADD].id, &priv->add,
- properties[PROP_WHITE_SUPPR].id, &priv->white_suppr,
- properties[PROP_BLACK_SUPPR].id, &priv->black_suppr,
- properties[PROP_LOAD].id, &priv->load,
- properties[PROP_PATTERN].id, &priv->pattern,
- properties[PROP_LICENSE].id, &priv->license,
- properties[PROP_ACTIONS].id, &priv->actions,
+ "adblock-ui", &priv->dialog,
+ "notebook", &priv->notebook,
+ "add", &priv->add,
+ "white_suppr", &priv->white_suppr,
+ "black_suppr", &priv->black_suppr,
+ "load", &priv->load,
+ "pattern", &priv->pattern,
+ "license", &priv->license,
+ "action_rules_frame", &priv->actions,
NULL);
g_signal_connect (priv->dialog, "response",
@@ -514,19 +479,19 @@ adblock_ui_page_construct (InfoPage *page)
{
case PATTERN_WHITELIST:
ephy_dialog_get_controls (edialog,
- properties[PROP_WHITELIST].id,
+ "white_treeview",
&page->treeview,
NULL);
break;
case PATTERN_BLACKLIST:
ephy_dialog_get_controls (edialog,
- properties[PROP_BLACKLIST].id,
+ "black_treeview",
&page->treeview,
NULL);
break;
case PATTERN_DEFAULT_BLACKLIST:
ephy_dialog_get_controls (edialog,
- properties[PROP_DEFAULTLIST].id,
+ "default_treeview",
&page->treeview,
NULL);
break;
diff --git a/extensions/error-viewer/error-viewer.c b/extensions/error-viewer/error-viewer.c
index f8f420a..fd34e92 100644
--- a/extensions/error-viewer/error-viewer.c
+++ b/extensions/error-viewer/error-viewer.c
@@ -42,21 +42,6 @@ struct ErrorViewerPrivate
enum
{
- PROP_WINDOW,
- PROP_TREEVIEW,
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { "error_viewer", NULL, PT_NORMAL, 0 },
- { "error_list", NULL, PT_NORMAL, 0 },
-
- { NULL }
-};
-
-enum
-{
COL_ICON,
COL_TEXT,
N_COLUMNS
@@ -216,9 +201,9 @@ build_ui (ErrorViewer *dialog)
ErrorViewerPrivate *priv = dialog->priv;
priv->window = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_WINDOW].id);
+ "error_viewer");
priv->treeview = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_TREEVIEW].id);
+ "error_list");
gtk_window_set_icon_name (GTK_WINDOW (priv->window),
GTK_STOCK_DIALOG_ERROR);
@@ -271,7 +256,6 @@ error_viewer_init (ErrorViewer *dialog)
dialog->priv->num_active = 0;
ephy_dialog_construct (EPHY_DIALOG (dialog),
- properties,
SHARE_DIR "/glade/error-viewer.glade",
"error_viewer",
GETTEXT_PACKAGE);
diff --git a/extensions/extensions-manager-ui/extensions-manager-ui.c b/extensions/extensions-manager-ui/extensions-manager-ui.c
index 7c2b9e5..46da5ef 100644
--- a/extensions/extensions-manager-ui/extensions-manager-ui.c
+++ b/extensions/extensions-manager-ui/extensions-manager-ui.c
@@ -52,21 +52,6 @@ struct ExtensionsManagerUIPrivate
enum
{
- PROP_WINDOW,
- PROP_TREEVIEW,
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { "extensions_manager_ui", NULL, PT_NORMAL, 0 },
- { "extensions_treeview", NULL, PT_NORMAL, 0 },
-
- { NULL }
-};
-
-enum
-{
COL_INFO, /* EphyExtensionInfo* */
COL_NAME, /* Search column */
COL_TOGGLE, /* enabled? */
@@ -342,9 +327,9 @@ build_ui (ExtensionsManagerUI *dialog)
ExtensionsManagerUIPrivate *priv = dialog->priv;
priv->window = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_WINDOW].id);
+ "extensions_manager_ui");
priv->treeview = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_TREEVIEW].id);
+ "extensions_treeview");
g_signal_connect (priv->window, "response",
G_CALLBACK (extensions_manager_ui_response_cb), dialog);
@@ -439,7 +424,6 @@ extensions_manager_ui_init (ExtensionsManagerUI *dialog)
(ephy_shell_get_extensions_manager (ephy_shell));
ephy_dialog_construct (EPHY_DIALOG (dialog),
- properties,
SHARE_DIR "/ui/extensions-manager-ui.ui",
"extensions_manager_ui",
GETTEXT_PACKAGE);
diff --git a/extensions/livehttpheaders/livehttpheaders-ui.c b/extensions/livehttpheaders/livehttpheaders-ui.c
index 873d241..c473316 100644
--- a/extensions/livehttpheaders/livehttpheaders-ui.c
+++ b/extensions/livehttpheaders/livehttpheaders-ui.c
@@ -60,32 +60,6 @@ struct _LiveHTTPHeadersUIPrivate
enum
{
- PROP_DIALOG,
- PROP_URLS,
- PROP_REQUEST,
- PROP_RESPONSE,
- PROP_CLEAR_CACHE,
- PROP_CLEAR_HEADERS,
- PROP_UPDATE,
- PROP_CLOSE,
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { "livehttpheaders_ui", NULL, PT_NORMAL, 0 },
- { "urls", NULL, PT_NORMAL, 0 },
- { "request", NULL, PT_NORMAL, 0 },
- { "response", NULL, PT_NORMAL, 0 },
- { "clear_cache", NULL, PT_NORMAL, 0 },
- { "clear_headers", NULL, PT_NORMAL, 0 },
- { "update", NULL, PT_NORMAL, 0 },
- { "close", NULL, PT_NORMAL, 0 },
- { NULL }
-};
-
-enum
-{
COL_URLS,
N_COLUMNS
};
@@ -281,20 +255,19 @@ livehttpheaders_ui_constructor (GType type,
priv = dialog->priv;
ephy_dialog_construct (EPHY_DIALOG (edialog),
- properties,
SHARE_DIR "/glade/livehttpheaders-ui.glade",
"livehttpheaders_ui",
GETTEXT_PACKAGE);
ephy_dialog_get_controls (edialog,
- properties[PROP_DIALOG].id, &priv->dialog,
- properties[PROP_URLS].id, &priv->treeview,
- properties[PROP_REQUEST].id, &priv->a_request,
- properties[PROP_RESPONSE].id, &priv->a_response,
- properties[PROP_CLEAR_HEADERS].id, &priv->clear_headers,
- properties[PROP_CLEAR_CACHE].id, &priv->clear_cache,
- properties[PROP_UPDATE].id, &priv->update,
- properties[PROP_CLOSE].id, &priv->close,
+ "livehttpheaders_ui", &priv->dialog,
+ "urls", &priv->treeview,
+ "request", &priv->a_request,
+ "response", &priv->a_response,
+ "clear_headers", &priv->clear_headers,
+ "clear_cache", &priv->clear_cache,
+ "update", &priv->update,
+ "close", &priv->close,
NULL);
g_signal_connect (priv->dialog, "response",
diff --git a/extensions/page-info/page-info-dialog.c b/extensions/page-info/page-info-dialog.c
index 41726b2..cdff664 100644
--- a/extensions/page-info/page-info-dialog.c
+++ b/extensions/page-info/page-info-dialog.c
@@ -106,95 +106,6 @@ enum
PROP_WINDOW
};
-enum
-{
- PROP_DIALOG,
- PROP_NOTEBOOK,
-
- PROP_GENERAL_PAGE_TITLE,
- PROP_GENERAL_URL,
- PROP_GENERAL_TYPE,
- PROP_GENERAL_MIME_TYPE,
- PROP_GENERAL_RENDER_MODE,
- PROP_GENERAL_SOURCE,
- PROP_GENERAL_ENCODING,
- PROP_GENERAL_SIZE,
- PROP_GENERAL_REFERRING_URL,
- PROP_GENERAL_MODIFIED,
- PROP_GENERAL_EXPIRES,
-
- PROP_LINKS_LINK_TREEVIEW,
-
- PROP_MEDIA_MEDIUM_TREEVIEW,
- PROP_MEDIA_MEDIUM_BOX,
- PROP_MEDIA_MEDIUM_VPANED,
- PROP_MEDIA_SAVE_BUTTON,
-
- PROP_FORMS_FORM_TREEVIEW,
-
- PROP_META_DC_BOX,
- PROP_META_DC_TITLE,
- PROP_META_DC_DESC,
- PROP_META_DC_DATE,
- PROP_META_DC_FORMAT,
- PROP_META_OTHER_LABEL,
- PROP_META_TREEVIEW,
-
-/*
- PROP_SECURITY_CERT_TITLE,
- PROP_SECURITY_CERT_INFO,
- PROP_SECURITY_CIPHER_TITLE,
- PROP_SECURITY_CIPHER_INFO,
- PROP_SECURITY_VIEW_CERT_VBOX
-*/
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { "page_info_dialog", NULL, PT_NORMAL, 0 },
- { "page_info_notebook", NULL, PT_NORMAL, 0 },
-
- { "page_info_page_title", NULL, PT_NORMAL, 0 },
- { "page_info_url", NULL, PT_NORMAL, 0 },
- { "page_info_type", NULL, PT_NORMAL, 0 },
- { "page_info_mime", NULL, PT_NORMAL, 0 },
- { "page_info_render_mode", NULL, PT_NORMAL, 0 },
- { "page_info_source", NULL, PT_NORMAL, 0 },
- { "page_info_encoding", NULL, PT_NORMAL, 0 },
- { "page_info_size", NULL, PT_NORMAL, 0 },
- { "page_info_referring_url", NULL, PT_NORMAL, 0 },
- { "page_info_modified", NULL, PT_NORMAL, 0 },
- { "page_info_expires", NULL, PT_NORMAL, 0 },
-
- { "page_info_link_list", NULL, PT_NORMAL, 0 },
-
- { "page_info_media_list", NULL, PT_NORMAL, 0 },
- { "page_info_media_box", NULL, PT_NORMAL, 0 },
- { "page_info_media_vpaned", NULL, PT_NORMAL, 0 },
- { "page_info_media_save", NULL, PT_NORMAL, 0 },
-
- { "page_info_form_list", NULL, PT_NORMAL, 0 },
-
- { "page_meta_dc_box", NULL, PT_NORMAL, 0 },
- { "page_meta_dc_title", NULL, PT_NORMAL, 0 },
- { "page_meta_dc_desc", NULL, PT_NORMAL, 0 },
- { "page_meta_dc_date", NULL, PT_NORMAL, 0 },
- { "page_meta_dc_format", NULL, PT_NORMAL, 0 },
- { "page_meta_other_label", NULL, PT_NORMAL, 0 },
- { "page_meta_list", NULL, PT_NORMAL, 0 },
-
- /*
- { PROP_SECURITY_CERT_TITLE, "page_info_security_title", NULL, PT_NORMAL, NULL },
- { PROP_SECURITY_CERT_INFO, "page_info_security_info", NULL, PT_NORMAL, NULL },
- { PROP_SECURITY_CIPHER_TITLE, "page_info_cipher_title", NULL, PT_NORMAL, NULL },
- { PROP_SECURITY_CIPHER_INFO, "page_info_cipher_info", NULL, PT_NORMAL, NULL },
- { PROP_SECURITY_VIEW_CERT_VBOX, "page_info_view_cert_vbox", NULL, PT_NORMAL, NULL },
- */
-
- { NULL }
-};
-
static const GtkTargetEntry drag_targets[] =
{
{ EPHY_DND_URL_TYPE, 0, 0 }
@@ -268,7 +179,7 @@ setup_page_security (PageInfoDialog *dialog, EmbedPageProperties *props)
/* Web Site Identity Verification */
/*
widget = galeon_dialog_get_control (GALEON_DIALOG (dialog),
- PROP_SECURITY_VIEW_CERT_VBOX);
+ "page_info_view_cert_vbox");
if (!props->secret_key_length)
{
const_title = _("Web Site Identity Not Verified");
@@ -291,8 +202,8 @@ setup_page_security (PageInfoDialog *dialog, EmbedPageProperties *props)
}
text = g_strdup_printf ("<b>%s</b>", const_title);
- page_info_set_text (dialog, PROP_SECURITY_CERT_TITLE, text);
- page_info_set_text (dialog, PROP_SECURITY_CERT_INFO, msg1);
+ page_info_set_text (dialog, "page_info_security_title", text);
+ page_info_set_text (dialog, "page_info_security_info", msg1);
g_free (text);
g_free (msg1);
@@ -346,11 +257,11 @@ setup_page_security (PageInfoDialog *dialog, EmbedPageProperties *props)
text = g_strdup_printf ("<b>%s</b>", title);
- page_info_set_text (dialog, PROP_SECURITY_CIPHER_TITLE, text);
+ page_info_set_text (dialog, "page_info_cipher_title", text);
g_free (text);
text = g_strdup_printf ("%s\n\n%s", msg1, msg2);
- page_info_set_text (dialog, PROP_SECURITY_CIPHER_INFO, text);
+ page_info_set_text (dialog, "page_info_cipher_info", text);
g_free (text);
g_free (title);
@@ -757,16 +668,16 @@ general_info_page_fill (InfoPage *page)
g_return_if_fail (props != NULL);
title = ephy_embed_get_title (embed);
- page_info_set_text (dialog, properties[PROP_GENERAL_PAGE_TITLE].id, title);
+ page_info_set_text (dialog, "page_info_page_title", title);
val = ephy_embed_get_location (embed, TRUE);
- page_info_set_text (dialog, properties[PROP_GENERAL_URL].id, val);
+ page_info_set_text (dialog, "page_info_url", val);
g_free (val);
- page_info_set_text (dialog, properties[PROP_GENERAL_MIME_TYPE].id, props->content_type);
+ page_info_set_text (dialog, "page_info_mime", props->content_type);
text = g_content_type_get_description (props->content_type);
- page_info_set_text (dialog, properties[PROP_GENERAL_TYPE].id,
+ page_info_set_text (dialog, "page_info_type",
text ? text : _("Unknown type"));
switch (props->rendering_mode)
@@ -786,7 +697,7 @@ general_info_page_fill (InfoPage *page)
break;
}
- page_info_set_text (dialog, properties[PROP_GENERAL_RENDER_MODE].id, text);
+ page_info_set_text (dialog, "page_info_render_mode", text);
switch (props->page_source)
{
@@ -804,22 +715,22 @@ general_info_page_fill (InfoPage *page)
break;
}
- page_info_set_text (dialog, properties[PROP_GENERAL_SOURCE].id, text);
+ page_info_set_text (dialog, "page_info_source", text);
- page_info_set_text (dialog, properties[PROP_GENERAL_ENCODING].id, props->encoding);
+ page_info_set_text (dialog, "page_info_encoding", props->encoding);
if (props->size != -1)
{
val = g_format_size_for_display ((goffset) props->size);
- page_info_set_text (dialog, properties[PROP_GENERAL_SIZE].id, val);
+ page_info_set_text (dialog, "page_info_size", val);
g_free (val);
}
else
{
- page_info_set_text (dialog, properties[PROP_GENERAL_SIZE].id, _("Unknown"));
+ page_info_set_text (dialog, "page_info_size", _("Unknown"));
}
- page_info_set_text (dialog, properties[PROP_GENERAL_REFERRING_URL].id,
+ page_info_set_text (dialog, "page_info_referring_url",
props->referring_url ? props->referring_url :
_("No referrer"));
@@ -829,12 +740,12 @@ general_info_page_fill (InfoPage *page)
strftime (date, sizeof (date), date_hack, localtime_r (&t, &tm));
val = g_locale_to_utf8 (date, -1, NULL, NULL, NULL);
- page_info_set_text (dialog, properties[PROP_GENERAL_MODIFIED].id, val);
+ page_info_set_text (dialog, "page_info_modified", val);
g_free (val);
}
else
{
- page_info_set_text (dialog, properties[PROP_GENERAL_MODIFIED].id,
+ page_info_set_text (dialog, "page_info_modified",
_("Not specified"));
}
@@ -845,12 +756,12 @@ general_info_page_fill (InfoPage *page)
strftime (date, sizeof (date), date_hack, localtime_r (&t, &tm));
val = g_locale_to_utf8 (date, -1, NULL, NULL, NULL);
- page_info_set_text (dialog, properties[PROP_GENERAL_EXPIRES].id, val);
+ page_info_set_text (dialog, "page_info_expires", val);
g_free (val);
}
else
{
- page_info_set_text (dialog, properties[PROP_GENERAL_EXPIRES].id,
+ page_info_set_text (dialog, "page_info_expires",
_("Not specified"));
}
@@ -1314,8 +1225,8 @@ media_info_page_construct (InfoPage *ipage)
ephy_dialog_get_controls
(EPHY_DIALOG (dialog),
- properties[PROP_MEDIA_MEDIUM_TREEVIEW].id, &treeview,
- properties[PROP_MEDIA_MEDIUM_BOX].id, &box,
+ "page_info_media_list", &treeview,
+ "page_info_media_box", &box,
NULL);
g_signal_connect (box, "realize",
@@ -1448,12 +1359,12 @@ media_info_page_construct (InfoPage *ipage)
gtk_tree_view_column_set_sort_column_id (column, COL_MEDIUM_HEIGHT);
button = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_MEDIA_SAVE_BUTTON].id);
+ "page_info_media_save");
g_signal_connect (button, "clicked",
G_CALLBACK (treeview_page_info_save_selected_cb), page);
vpaned = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_MEDIA_MEDIUM_VPANED].id);
+ "page_info_media_vpaned");
ephy_state_add_paned (vpaned, "PageInfoDialog::MediaPage::VPaned",
MEDIUM_PANED_POSITION_DEFAULT);
@@ -1647,7 +1558,7 @@ links_info_page_construct (InfoPage *ipage)
EphyAdBlockManager *adblock_manager;
treeview = GTK_TREE_VIEW (ephy_dialog_get_control
- (EPHY_DIALOG (dialog), properties[PROP_LINKS_LINK_TREEVIEW].id));
+ (EPHY_DIALOG (dialog), "page_info_link_list"));
adblock_manager = EPHY_ADBLOCK_MANAGER (
ephy_embed_shell_get_adblock_manager (embed_shell));
@@ -1855,7 +1766,7 @@ forms_info_page_construct (InfoPage *ipage)
GtkTreeSelection *selection;
treeview = GTK_TREE_VIEW (ephy_dialog_get_control
- (EPHY_DIALOG (dialog), properties[PROP_FORMS_FORM_TREEVIEW].id));
+ (EPHY_DIALOG (dialog), "page_info_form_list"));
liststore = gtk_list_store_new (3,
G_TYPE_STRING,
@@ -1997,7 +1908,7 @@ metadata_info_page_construct (InfoPage *ipage)
GtkTreeSelection *selection;
treeview = GTK_TREE_VIEW (ephy_dialog_get_control
- (EPHY_DIALOG (dialog), properties[PROP_META_TREEVIEW].id));
+ (EPHY_DIALOG (dialog), "page_meta_list"));
liststore = gtk_list_store_new (2,
G_TYPE_STRING,
@@ -2036,10 +1947,10 @@ metadata_info_page_construct (InfoPage *ipage)
/* empty all the DCM fields */
- page_info_set_text (dialog, properties[PROP_META_DC_TITLE].id, "");
- page_info_set_text (dialog, properties[PROP_META_DC_DESC].id, "");
- page_info_set_text (dialog, properties[PROP_META_DC_DATE].id, "");
- page_info_set_text (dialog, properties[PROP_META_DC_FORMAT].id, "");
+ page_info_set_text (dialog, "page_meta_dc_title", "");
+ page_info_set_text (dialog, "page_meta_dc_desc", "");
+ page_info_set_text (dialog, "page_meta_dc_date", "");
+ page_info_set_text (dialog, "page_meta_dc_format", "");
tpage->store = liststore;
tpage->selection = selection;
@@ -2058,19 +1969,19 @@ metadata_add_dc_tag (MetadataInfoPage *page,
if (strcmp (tag->name, "DC.title") == 0)
{
- page_info_set_text (dialog, properties[PROP_META_DC_TITLE].id, tag->content);
+ page_info_set_text (dialog, "page_meta_dc_title", tag->content);
}
else if (strcmp (tag->name, "DC.description") == 0)
{
- page_info_set_text (dialog, properties[PROP_META_DC_DESC].id, tag->content);
+ page_info_set_text (dialog, "page_meta_dc_desc", tag->content);
}
else if (strcmp (tag->name, "DC.date") == 0)
{
- page_info_set_text (dialog, properties[PROP_META_DC_DATE].id, tag->content);
+ page_info_set_text (dialog, "page_meta_dc_date", tag->content);
}
else if (strcmp (tag->name, "DC.format") == 0)
{
- page_info_set_text (dialog, properties[PROP_META_DC_FORMAT].id, tag->content);
+ page_info_set_text (dialog, "page_meta_dc_format", tag->content);
}
else
{
@@ -2120,11 +2031,11 @@ metadata_info_page_fill (InfoPage *ipage)
if (!have_dc)
{
widget = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_META_DC_BOX].id);
+ "page_meta_dc_box");
gtk_widget_hide (widget);
widget = ephy_dialog_get_control (EPHY_DIALOG (dialog),
- properties[PROP_META_OTHER_LABEL].id);
+ "page_meta_other_label");
text = g_strconcat ("<b>", _("Page Metadata"), "</b>", NULL);
gtk_label_set_markup (GTK_LABEL (widget), text);
g_free (text);
@@ -2204,18 +2115,17 @@ page_info_dialog_constructor (GType type,
priv = dialog->priv;
ephy_dialog_construct (edialog,
- properties,
SHARE_DIR "/glade/page-info.glade",
"page_info_dialog",
GETTEXT_PACKAGE);
/*
- notebook = ephy_dialog_get_control (edialog, properties[PROP_NOTEBOOK].id);
+ notebook = ephy_dialog_get_control (edialog, "page_info_notebook");
g_signal_connect_after (notebook, "switch_page",
G_CALLBACK (sync_notebook_page), dialog);
*/
- priv->dialog = ephy_dialog_get_control (edialog, properties[PROP_DIALOG].id);
+ priv->dialog = ephy_dialog_get_control (edialog, "page_info_dialog");
g_signal_connect (priv->dialog, "response",
G_CALLBACK (page_info_dialog_response_cb), dialog);
diff --git a/extensions/rss/rss-ui.c b/extensions/rss/rss-ui.c
index f18905f..43126e1 100644
--- a/extensions/rss/rss-ui.c
+++ b/extensions/rss/rss-ui.c
@@ -68,26 +68,6 @@ enum
enum
{
- PROP_DIALOG,
- PROP_TITLE,
- PROP_FEEDS,
- PROP_SUBSCRIBE,
- PROP_CLOSE,
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { "rss_ui", NULL, PT_NORMAL, 0 },
- { "title", NULL, PT_NORMAL, 0 },
- { "feeds", NULL, PT_NORMAL, 0 },
- { "subscribe", NULL, PT_NORMAL, 0 },
- { "close", NULL, PT_NORMAL, 0 },
- { NULL }
-};
-
-enum
-{
COL_FEED, /* NewsFeed* */
COL_SEARCH, /* Search column */
COL_TOGGLE, /* enabled? */
@@ -516,17 +496,16 @@ rss_ui_constructor (GType type,
priv = dialog->priv;
ephy_dialog_construct (EPHY_DIALOG (edialog),
- properties,
SHARE_DIR "/ui/rss-ui.ui",
"rss_ui",
GETTEXT_PACKAGE);
ephy_dialog_get_controls (edialog,
- properties[PROP_DIALOG].id, &priv->dialog,
- properties[PROP_TITLE].id, &priv->title,
- properties[PROP_FEEDS].id, &priv->treeview,
- properties[PROP_SUBSCRIBE].id, &priv->subscribe,
- properties[PROP_CLOSE].id, &priv->close,
+ "rss_ui", &priv->dialog,
+ "title", &priv->title,
+ "feeds", &priv->treeview,
+ "subscribe", &priv->subscribe,
+ "close", &priv->close,
NULL);
g_object_get (object,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]