summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/dlg-batch-add.c3
-rw-r--r--src/dlg-extract.c1
-rw-r--r--src/fr-init.c3
-rw-r--r--src/fr-stock.c81
-rw-r--r--src/fr-stock.h33
-rw-r--r--src/fr-window.c1
-rw-r--r--src/ui.h15
-rw-r--r--src/ui/batch-add-files.ui17
9 files changed, 19 insertions, 137 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2f14c1d..52773ec 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -127,8 +127,6 @@ COMMON_SOURCES = \
fr-init.h \
fr-list-model.c \
fr-list-model.h \
- fr-stock.c \
- fr-stock.h \
fr-proc-error.c \
fr-proc-error.h \
fr-process.c \
diff --git a/src/dlg-batch-add.c b/src/dlg-batch-add.c
index 7e416e6..4d7a3ca 100644
--- a/src/dlg-batch-add.c
+++ b/src/dlg-batch-add.c
@@ -29,7 +29,6 @@
#include "dlg-batch-add.h"
#include "file-utils.h"
#include "fr-init.h"
-#include "fr-stock.h"
#include "fr-window.h"
#include "gtk-utils.h"
#include "glib-utils.h"
@@ -497,8 +496,6 @@ dlg_batch_add_files (FrWindow *window,
gtk_size_group_add_widget (size_group, GET_WIDGET ("a_location_label"));
gtk_size_group_add_widget (size_group, GET_WIDGET ("a_password_label"));
- gtk_button_set_use_stock (GTK_BUTTON (GET_WIDGET ("a_add_button")), TRUE);
- gtk_button_set_label (GTK_BUTTON (GET_WIDGET ("a_add_button")), FR_STOCK_CREATE_ARCHIVE);
gtk_expander_set_expanded (GTK_EXPANDER (GET_WIDGET ("a_other_options_expander")), FALSE /*g_settings_get_boolean (data->settings, PREF_BATCH_ADD_OTHER_OPTIONS)*/);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("a_encrypt_header_checkbutton")), g_settings_get_boolean (data->settings_general, PREF_GENERAL_ENCRYPT_HEADER));
gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("a_volume_spinbutton")), g_settings_get_int (data->settings, PREF_BATCH_ADD_VOLUME_SIZE) / MEGABYTE);
diff --git a/src/dlg-extract.c b/src/dlg-extract.c
index 5eda7dc..836cc09 100644
--- a/src/dlg-extract.c
+++ b/src/dlg-extract.c
@@ -25,7 +25,6 @@
#include <unistd.h>
#include <gtk/gtk.h>
#include "file-utils.h"
-#include "fr-stock.h"
#include "fr-init.h"
#include "gtk-utils.h"
#include "fr-window.h"
diff --git a/src/fr-init.c b/src/fr-init.c
index fa5d026..850df07 100644
--- a/src/fr-init.c
+++ b/src/fr-init.c
@@ -50,7 +50,6 @@
#include "fr-command-lrzip.h"
#include "fr-init.h"
#include "fr-process.h"
-#include "fr-stock.h"
#include "fr-window.h"
#include "typedefs.h"
#include "preferences.h"
@@ -654,8 +653,6 @@ initialize_data (void)
migrate_options_directory ();
register_commands ();
compute_supported_archive_types ();
-
- fr_stock_init ();
}
diff --git a/src/fr-stock.c b/src/fr-stock.c
deleted file mode 100644
index e292b04..0000000
--- a/src/fr-stock.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Engrampa
- *
- * Copyright (C) 2003 Free Software Foundation, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <config.h>
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include "fr-stock.h"
-
-
-static gboolean stock_initialized = FALSE;
-
-static const struct {
- const char *stock_id;
- const char *icon;
-} stock_icons [] = {
- { FR_STOCK_CREATE_ARCHIVE, "add-files-to-archive" },
- { FR_STOCK_ADD_FILES, "add-files-to-archive" },
- { FR_STOCK_ADD_FOLDER, "add-folder-to-archive" },
- { FR_STOCK_EXTRACT, "extract-archive" }
-};
-
-static const GtkStockItem stock_items [] = {
- { FR_STOCK_CREATE_ARCHIVE, N_("C_reate"), 0, 0, GETTEXT_PACKAGE },
- { FR_STOCK_ADD_FILES, N_("_Add"), 0, 0, GETTEXT_PACKAGE },
- { FR_STOCK_ADD_FOLDER, N_("_Add"), 0, 0, GETTEXT_PACKAGE },
- { FR_STOCK_EXTRACT, N_("_Extract"), 0, 0, GETTEXT_PACKAGE }
-};
-
-void
-fr_stock_init (void)
-{
- GtkIconFactory *factory;
- GtkIconSource *source;
- size_t i;
-
- if (stock_initialized)
- return;
- stock_initialized = TRUE;
-
- gtk_stock_add_static (stock_items, G_N_ELEMENTS (stock_items));
-
- factory = gtk_icon_factory_new ();
- gtk_icon_factory_add_default (factory);
-
- source = gtk_icon_source_new ();
-
- for (i = 0; i < G_N_ELEMENTS (stock_icons); i++) {
- GtkIconSet *set;
-
- gtk_icon_source_set_icon_name (source, stock_icons [i].icon);
-
- set = gtk_icon_set_new ();
- gtk_icon_set_add_source (set, source);
-
- gtk_icon_factory_add (factory, stock_icons [i].stock_id, set);
- gtk_icon_set_unref (set);
- }
-
- gtk_icon_source_free (source);
-
- g_object_unref (factory);
-}
diff --git a/src/fr-stock.h b/src/fr-stock.h
deleted file mode 100644
index 69bde49..0000000
--- a/src/fr-stock.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Engrampa
- *
- * Copyright (C) 2003 Free Software Foundation, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef FR_STOCK_H
-#define FR_STOCK_H
-
-#define FR_STOCK_CREATE_ARCHIVE "create-archive"
-#define FR_STOCK_ADD_FILES "add-files-to-archive"
-#define FR_STOCK_ADD_FOLDER "add-folder-to-archive"
-#define FR_STOCK_EXTRACT "extract-archive"
-
-void fr_stock_init (void);
-
-#endif /* FR_STOCK_H */
diff --git a/src/fr-window.c b/src/fr-window.c
index d44711d..540c502 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -43,7 +43,6 @@
#include "fr-list-model.h"
#include "fr-archive.h"
#include "fr-error.h"
-#include "fr-stock.h"
#include "fr-window.h"
#include "file-data.h"
#include "file-utils.h"
diff --git a/src/ui.h b/src/ui.h
index a288468..2841b76 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -25,7 +25,6 @@
#include "actions.h"
-#include "fr-stock.h"
static GtkActionEntry action_entries[] = {
@@ -39,19 +38,19 @@ static GtkActionEntry action_entries[] = {
N_("_About"), NULL,
N_("Information about the program"),
G_CALLBACK (activate_action_about) },
- { "AddFiles", FR_STOCK_ADD_FILES,
+ { "AddFiles", "add-files-to-archive",
N_("_Add Files…"), NULL,
N_("Add files to the archive"),
G_CALLBACK (activate_action_add_files) },
- { "AddFiles_Toolbar", FR_STOCK_ADD_FILES,
+ { "AddFiles_Toolbar", "add-files-to-archive",
N_("Add Files"), NULL,
N_("Add files to the archive"),
G_CALLBACK (activate_action_add_files) },
- { "AddFolder", FR_STOCK_ADD_FOLDER,
+ { "AddFolder", "add-folder-to-archive",
N_("Add a _Folder…"), NULL,
N_("Add a folder to the archive"),
G_CALLBACK (activate_action_add_folder) },
- { "AddFolder_Toolbar", FR_STOCK_ADD_FOLDER,
+ { "AddFolder_Toolbar", "add-folder-to-archive",
N_("Add Folder"), NULL,
N_("Add a folder to the archive"),
G_CALLBACK (activate_action_add_folder) },
@@ -110,15 +109,15 @@ static GtkActionEntry action_entries[] = {
N_("Dese_lect All"), "<shift><control>A",
N_("Deselect all files"),
G_CALLBACK (activate_action_deselect_all) },
- { "Extract", FR_STOCK_EXTRACT,
+ { "Extract", "extract-archive",
N_("_Extract…"), "<control>E",
N_("Extract files from the archive"),
G_CALLBACK (activate_action_extract) },
- { "ExtractFolderFromSidebar", FR_STOCK_EXTRACT,
+ { "ExtractFolderFromSidebar", "extract-archive",
N_("_Extract…"), NULL,
N_("Extract files from the archive"),
G_CALLBACK (activate_action_extract_folder_from_sidebar) },
- { "Extract_Toolbar", FR_STOCK_EXTRACT,
+ { "Extract_Toolbar", "extract-archive",
N_("Extract"), NULL,
N_("Extract files from the archive"),
G_CALLBACK (activate_action_extract) },
diff --git a/src/ui/batch-add-files.ui b/src/ui/batch-add-files.ui
index f3ae2f9..476cb0c 100644
--- a/src/ui/batch-add-files.ui
+++ b/src/ui/batch-add-files.ui
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.2 -->
<interface>
- <requires lib="gtk+" version="3.14"/>
+ <requires lib="gtk+" version="3.22"/>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">add-files-to-archive</property>
+ </object>
<object class="GtkAdjustment" id="volume_adjustment">
<property name="lower">0.10000000000000001</property>
<property name="upper">9999999999</property>
@@ -16,6 +21,9 @@
<property name="resizable">False</property>
<property name="window_position">center</property>
<property name="type_hint">normal</property>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox11">
<property name="visible">True</property>
@@ -43,16 +51,15 @@
</child>
<child>
<object class="GtkButton" id="a_add_button">
+ <property name="label" translatable="yes">C_reate</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">False</property>
+ <property name="image">image1</property>
<property name="use_underline">True</property>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>