summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-11-08 14:30:53 -0300
committerPerberos <[email protected]>2011-11-08 14:30:53 -0300
commitb65a74287bf28bec6e020af51a34e123c670b531 (patch)
tree024aace2cf9b17cc8124544581c34b96bc530a26 /src
parent2358ba4314dc6d757049bc4871ecf2922614b61b (diff)
downloadmate-calc-b65a74287bf28bec6e020af51a34e123c670b531.tar.bz2
mate-calc-b65a74287bf28bec6e020af51a34e123c670b531.tar.xz
renaming from gcalctool to mate-conf
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am32
-rw-r--r--src/currency.c4
-rw-r--r--src/mate-calc-cmd.c (renamed from src/gcalccmd.c)0
-rw-r--r--src/mate-conf.c (renamed from src/gcalctool.c)10
-rw-r--r--src/math-variables.c14
-rw-r--r--src/math-window.c32
6 files changed, 46 insertions, 46 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ce63954..c01c037 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,17 +1,17 @@
-bin_PROGRAMS = gcalctool gcalccmd
+bin_PROGRAMS = mate-calc mate-calc-cmd
INCLUDES = \
- -DUI_DIR=\""$(datadir)/gcalctool"\" \
+ -DUI_DIR=\""$(datadir)/mate-calc"\" \
-DVERSION=\""$(VERSION)"\" \
-DLOCALE_DIR=\""$(localedir)"\" \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
$(WARN_CFLAGS) \
- $(GCALCTOOL_CFLAGS)
+ $(MATE_CALC_CFLAGS)
-gcalctool_SOURCES = \
+mate_calc_SOURCES = \
currency.c \
currency.h \
- gcalctool.c \
+ mate-calc.c \
math-buttons.c \
math-buttons.h \
math-display.c \
@@ -42,11 +42,11 @@ gcalctool_SOURCES = \
unittest.c \
unittest.h
-gcalctool_LDADD = \
- $(GCALCTOOL_LIBS)
+mate_calc_LDADD = \
+ $(MATE_CALC_LIBS)
-gcalccmd_SOURCES = \
- gcalccmd.c \
+mate_calc_cmd_SOURCES = \
+ mate-calc-cmd.c \
mp.c \
mp-convert.c \
mp-binary.c \
@@ -55,8 +55,8 @@ gcalccmd_SOURCES = \
mp-equation-parser.c \
mp-equation-lexer.c
-gcalccmd_LDADD = \
- $(GCALCCMD_LIBS) \
+mate_calc_cmd_LDADD = \
+ $(MATE_CALC_CMD_LIBS) \
-lm
CLEANFILES = \
@@ -78,12 +78,12 @@ mp-equation-parser.o: mp-equation-lexer.h
mp-equation-lexer.o: mp-equation-parser.h
mp-equation.c: mp-equation-lexer.h mp-equation-parser.h
-# Install a symlink between gcalctool and mate-calculator
+# Install a symlink between mate-calc and mate-calculator
install-exec-hook:
test -e "$(DESTDIR)$(bindir)/mate-calculator" \
- || (cd "$(DESTDIR)$(bindir)" && ln -s gcalctool mate-calculator)
+ || (cd "$(DESTDIR)$(bindir)" && ln -s mate-calc mate-calculator)
-# Remove the symlink between gcalctool and mate-calculator
+# Remove the symlink between mate-calc and mate-calculator
uninstall-local:
test -h "$(DESTDIR)$(bindir)/mate-calculator" \
&& rm -f "$(DESTDIR)$(bindir)/mate-calculator"
@@ -95,5 +95,5 @@ EXTRA_DIST = \
DISTCLEANFILES = \
Makefile.in
-test: gcalctool
- ./gcalctool -u
+test: mate-calc
+ ./mate-calc -u
diff --git a/src/currency.c b/src/currency.c
index 1900a58..4029763 100644
--- a/src/currency.c
+++ b/src/currency.c
@@ -25,7 +25,7 @@ static char*
get_rate_filepath()
{
return g_build_filename(g_get_user_cache_dir (),
- "gcalctool",
+ "mate-calc",
"eurofxref-daily.xml",
NULL);
}
@@ -211,7 +211,7 @@ currency_convert(const MPNumber *from_amount,
}
if (!loaded_rates)
currency_load_rates();
-
+
from_index = currency_get_index(source_currency);
to_index = currency_get_index(target_currency);
if (from_index < 0 || to_index < 0)
diff --git a/src/gcalccmd.c b/src/mate-calc-cmd.c
index 9af9a58..9af9a58 100644
--- a/src/gcalccmd.c
+++ b/src/mate-calc-cmd.c
diff --git a/src/gcalctool.c b/src/mate-conf.c
index 4e40f6a..ccc74bd 100644
--- a/src/gcalctool.c
+++ b/src/mate-conf.c
@@ -72,7 +72,7 @@ static void
usage(const gchar *progname, gboolean show_application, gboolean show_gtk)
{
fprintf(stderr,
- /* Description on how to use gcalctool displayed on command-line */
+ /* Description on how to use mate-calc displayed on command-line */
_("Usage:\n"
" %s — Perform mathematical calculations"), progname);
@@ -80,7 +80,7 @@ usage(const gchar *progname, gboolean show_application, gboolean show_gtk)
"\n\n");
fprintf(stderr,
- /* Description on gcalctool command-line help options displayed on command-line */
+ /* Description on mate-calc command-line help options displayed on command-line */
_("Help Options:\n"
" -v, --version Show release version\n"
" -h, -?, --help Show help options\n"
@@ -91,7 +91,7 @@ usage(const gchar *progname, gboolean show_application, gboolean show_gtk)
if (show_gtk) {
fprintf(stderr,
- /* Description on gcalctool command-line GTK+ options displayed on command-line */
+ /* Description on mate-calc command-line GTK+ options displayed on command-line */
_("GTK+ Options:\n"
" --class=CLASS Program class as used by the window manager\n"
" --name=NAME Program name as used by the window manager\n"
@@ -105,7 +105,7 @@ usage(const gchar *progname, gboolean show_application, gboolean show_gtk)
if (show_application) {
fprintf(stderr,
- /* Description on gcalctool application options displayed on command-line */
+ /* Description on mate-calc application options displayed on command-line */
_("Application Options:\n"
" -u, --unittest Perform unit tests\n"
" -s, --solve <equation> Solve the given equation"));
@@ -222,7 +222,7 @@ main(int argc, char **argv)
get_options(argc, argv);
- settings = g_settings_new ("org.mate.gcalctool");
+ settings = g_settings_new ("org.mate.mate-calc");
accuracy = g_settings_get_int(settings, "accuracy");
word_size = g_settings_get_int(settings, "word-size");
base = g_settings_get_int(settings, "base");
diff --git a/src/math-variables.c b/src/math-variables.c
index b4f7720..47a672a 100644
--- a/src/math-variables.c
+++ b/src/math-variables.c
@@ -43,24 +43,24 @@ registers_load(MathVariables *variables)
{
FILE *f;
char line[1024];
-
+
f = fopen(variables->priv->file_name, "r");
if (!f)
return;
-
+
g_hash_table_remove_all(variables->priv->registers);
while (fgets(line, 1024, f) != NULL)
{
char *name, *value;
MPNumber *t;
-
+
value = strchr(line, '=');
if (!value)
continue;
*value = '\0';
value = value + 1;
-
+
name = g_strstrip(line);
value = g_strstrip(value);
@@ -89,7 +89,7 @@ registers_save(MathVariables *variables)
f = fopen(variables->priv->file_name, "w");
if (!f)
return;
-
+
g_hash_table_iter_init(&iter, variables->priv->registers);
while (g_hash_table_iter_next(&iter, &key, &val))
{
@@ -112,7 +112,7 @@ math_variables_get_names(MathVariables *variables)
gpointer key;
gint i = 0;
gchar **names;
-
+
names = g_malloc0(sizeof(gchar *) * (g_hash_table_size(variables->priv->registers) + 1));
g_hash_table_iter_init(&iter, variables->priv->registers);
@@ -158,6 +158,6 @@ math_variables_init(MathVariables *variables)
{
variables->priv = G_TYPE_INSTANCE_GET_PRIVATE (variables, math_variables_get_type(), MathVariablesPrivate);
variables->priv->registers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
- variables->priv->file_name = g_build_filename(g_get_user_data_dir(), "gcalctool", "registers", NULL);
+ variables->priv->file_name = g_build_filename(g_get_user_data_dir(), "mate-calc", "registers", NULL);
registers_load(variables);
}
diff --git a/src/math-window.c b/src/math-window.c
index 0daf030..2fc010e 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -105,7 +105,7 @@ math_window_critical_error(MathWindow *window, const gchar *title, const gchar *
static void
copy_cb(GtkWidget *widget, MathWindow *window)
{
- math_equation_copy (window->priv->equation);
+ math_equation_copy (window->priv->equation);
}
@@ -161,7 +161,7 @@ help_cb(GtkWidget *widget, MathWindow *window)
GError *error = NULL;
screen = gtk_widget_get_screen (GTK_WIDGET (window));
- gtk_show_uri (screen, "ghelp:gcalctool", gtk_get_current_event_time (), &error);
+ gtk_show_uri (screen, "ghelp:mate-calc", gtk_get_current_event_time (), &error);
if (error != NULL)
{
@@ -201,28 +201,28 @@ about_cb(GtkWidget *widget, MathWindow *window)
const gchar *translator_credits = _("translator-credits");
/* The license this software is under (GPL2+) */
- char *license = _("Gcalctool is free software; you can redistribute it and/or modify\n"
+ char *license = _("mate-calc is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version.\n"
"\n"
- "Gcalctool is distributed in the hope that it will be useful,\n"
+ "mate-calc is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
- "along with Gcalctool; if not, write to the Free Software Foundation, Inc.,\n"
+ "along with mate-calc; if not, write to the Free Software Foundation, Inc.,\n"
"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA");
gtk_show_about_dialog(GTK_WINDOW(window),
"name",
/* Program name in the about dialog */
- _("Gcalctool"),
+ _("mate-calc"),
"version", VERSION,
"copyright",
/* Copyright notice in the about dialog */
- _("\xc2\xa9 1986–2010 The Gcalctool authors"),
+ _("\xc2\xa9 1986–2010 The mate-calc authors"),
"license", license,
"comments",
/* Short description in the about dialog */
@@ -347,21 +347,21 @@ create_menu(MathWindow *window)
GtkAccelGroup *accel_group;
GtkWidget *menu, *menu_item;
GSList *group = NULL;
-
+
accel_group = gtk_accel_group_new();
gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
- /* Calculator menu */
+ /* Calculator menu */
#define CALCULATOR_MENU_LABEL _("_Calculator")
/* Mode menu */
#define MODE_MENU_LABEL _("_Mode")
/* Help menu label */
#define HELP_MENU_LABEL _("_Help")
- /* Basic menu label */
+ /* Basic menu label */
#define MODE_BASIC_LABEL _("_Basic")
- /* Advanced menu label */
+ /* Advanced menu label */
#define MODE_ADVANCED_LABEL _("_Advanced")
- /* Financial menu label */
+ /* Financial menu label */
#define MODE_FINANCIAL_LABEL _("_Financial")
/* Programming menu label */
#define MODE_PROGRAMMING_LABEL _("_Programming")
@@ -403,7 +403,7 @@ create_gui(MathWindow *window)
{
GtkWidget *main_vbox, *vbox;
GtkWidget *scrolled_window;
-
+
main_vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(window), main_vbox);
gtk_widget_show(main_vbox);
@@ -411,12 +411,12 @@ create_gui(MathWindow *window)
window->priv->menu_bar = gtk_menu_bar_new();
gtk_box_pack_start(GTK_BOX(main_vbox), window->priv->menu_bar, TRUE, TRUE, 0);
gtk_widget_show(window->priv->menu_bar);
-
+
create_menu(window);
vbox = gtk_vbox_new(FALSE, 6);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
- gtk_box_pack_start(GTK_BOX(main_vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(main_vbox), vbox, TRUE, TRUE, 0);
gtk_widget_show(vbox);
scrolled_window = gtk_scrolled_window_new(NULL, NULL);
@@ -520,7 +520,7 @@ math_window_init(MathWindow *window)
/* Title of main window */
_("Calculator"));
gtk_window_set_icon_name(GTK_WINDOW(window), "accessories-calculator");
- gtk_window_set_role(GTK_WINDOW(window), "gcalctool");
+ gtk_window_set_role(GTK_WINDOW(window), "mate-calc");
gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
g_signal_connect_after(G_OBJECT(window), "key-press-event", G_CALLBACK(key_press_cb), NULL);
g_signal_connect(G_OBJECT(window), "delete-event", G_CALLBACK(delete_cb), NULL);