aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/callbacks.c57
-rw-r--r--shell/report.c2
-rw-r--r--shell/shell.c59
3 files changed, 1 insertions, 117 deletions
diff --git a/shell/callbacks.c b/shell/callbacks.c
index e7808471..c60487d9 100644
--- a/shell/callbacks.c
+++ b/shell/callbacks.c
@@ -138,63 +138,6 @@ void cb_toolbar()
shell_ui_manager_set_visible("/MainMenuBarAction", visible);
}
-void cb_about_module(GtkAction * action)
-{
- Shell *shell = shell_get_main_shell();
- GSList *modules = shell->tree->modules;
- const ModuleAbout *ma;
- gchar *name;
-
- g_object_get(G_OBJECT(action), "tooltip", &name, NULL);
-
- for (; modules; modules = modules->next) {
- ShellModule *sm = (ShellModule *) modules->data;
-
- if (!g_str_equal(sm->name, name))
- continue;
-
- if ((ma = module_get_about(sm))) {
- GtkWidget *about;
- gchar *text;
-
- about = gtk_about_dialog_new();
-
- gtk_window_set_transient_for(GTK_WINDOW(about), GTK_WINDOW(shell->window));
-
- text = g_strdup(sm->name);
-#if GTK_CHECK_VERSION(2, 12, 0)
- gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about), text);
-#else
- gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), text);
-#endif
- g_free(text);
-
- gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about),
- ma->version);
-
- text = g_strdup_printf(_("Written by %s\nLicensed under %s"),
- ma->author, ma->license);
- gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), text);
- g_free(text);
-
- if (ma->description)
- gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about),
- _(ma->description));
-
- gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), sm->icon);
- gtk_dialog_run(GTK_DIALOG(about));
- gtk_widget_destroy(about);
- } else {
- g_warning
- (_("No about information is associated with the %s module."),
- name);
- }
-
- break;
- }
-
- g_free(name);
-}
void cb_about()
{
diff --git a/shell/report.c b/shell/report.c
index 25b73beb..d264128e 100644
--- a/shell/report.c
+++ b/shell/report.c
@@ -289,7 +289,7 @@ void report_details(ReportContext *ctx, gchar *key, gchar *value, gchar *details
static void report_table_shell_dump(ReportContext *ctx, gchar *key_file_str, int level)
{
- gchar *text, *p, *next_nl, *eq, *indent;
+ gchar *text=NULL, *p, *next_nl, *eq, *indent;
gchar *key, *value;
indent = g_strnfill(level * 4, ' ');
diff --git a/shell/shell.c b/shell/shell.c
index e74486f2..e3f64891 100644
--- a/shell/shell.c
+++ b/shell/shell.c
@@ -523,63 +523,6 @@ static void menu_item_set_icon_always_visible(Shell *shell,
g_free(path);
}
-static void add_module_to_menu(gchar * name, GdkPixbuf * pixbuf)
-{
- GtkAction *action;
- GtkWidget *menuitem;
- gchar *about_module = g_strdup_printf("AboutModule%s", name);
- gchar *path;
- gint merge_id;
-
- GtkActionEntry entries[] = {
- {
- name, /* name */
- name, /* stockid */
- name, /* label */
- NULL, /* accelerator */
- NULL, /* tooltip */
- NULL, /* callback */
- },
- {
- about_module,
- name,
- name,
- NULL,
- name,
- (GCallback) cb_about_module,
- },
- };
-
- stock_icon_register_pixbuf(pixbuf, name);
-
- if ((action = gtk_action_group_get_action(shell->action_group, name))) {
- gtk_action_group_remove_action(shell->action_group, action);
- }
-
- if ((action = gtk_action_group_get_action(shell->action_group, about_module))) {
- gtk_action_group_remove_action(shell->action_group, action);
- }
-
- gtk_action_group_add_actions(shell->action_group, entries, 2, NULL);
-
- merge_id = gtk_ui_manager_new_merge_id(shell->ui_manager);
- gtk_ui_manager_add_ui(shell->ui_manager,
- merge_id,
- "/menubar/ViewMenu/LastSep",
- name, name, GTK_UI_MANAGER_MENU, TRUE);
- shell->merge_ids = g_slist_prepend(shell->merge_ids, GINT_TO_POINTER(merge_id));
-
- merge_id = gtk_ui_manager_new_merge_id(shell->ui_manager);
- gtk_ui_manager_add_ui(shell->ui_manager,
- merge_id,
- // "/menubar/HelpMenu/HelpMenuModules/LastSep",
- "/menubar/HelpMenu/LastSep",
- about_module, about_module, GTK_UI_MANAGER_AUTO,
- TRUE);
- shell->merge_ids = g_slist_prepend(shell->merge_ids, GINT_TO_POINTER(merge_id));
-
- menu_item_set_icon_always_visible(shell, "/menubar/ViewMenu", name);
-}
static void
add_module_entry_to_view_menu(gchar * module, gchar * name,
@@ -643,8 +586,6 @@ void shell_add_modules_to_gui(gpointer _shell_module, gpointer _shell_tree)
-1);
}
- //add_module_to_menu(module->name, module->icon);
-
if (module->entries) {
ShellModuleEntry *entry;
GSList *p;