Commit 205c76a0 authored by Gediminas Paulauskas's avatar Gediminas Paulauskas Committed by Gediminas Paulauskas

get translations from GETTEXT_PACKAGE domain and with UTF-8 codeset, so

2001-12-16  Gediminas Paulauskas <menesis@delfi.lt>

	* gnome-desktop/gnome-ditem-edit.c: get translations from
	GETTEXT_PACKAGE domain and with UTF-8 codeset, so that translations
	work when library is used outside of gnome-core.

2001-12-16  Gediminas Paulauskas <menesis@delfi.lt>

	* gnome-run.c, launcher.c, menu-properties.c, menu.c, panel-config.c,
	swallow.c: use GTK_RESPONSE_* instead of custom *_BUTTON
	enumerations -- this makes Help buttons left-aligned. Reorder buttons
	to comply with HIG, set default response to leftmost button.
parent abc5e111
2001-12-16 Gediminas Paulauskas <menesis@delfi.lt>
* gnome-run.c, launcher.c, menu-properties.c, menu.c, panel-config.c,
swallow.c: use GTK_RESPONSE_* instead of custom *_BUTTON
enumerations -- this makes Help buttons left-aligned. Reorder buttons
to comply with HIG, set default response to leftmost button.
Fri Dec 14 16:50:07 2001 George Lebl <jirka@5z.com>
* drawer.c: reenable property apply code
......
......@@ -184,8 +184,6 @@ get_environment (int *argc, char ***argv, int *envc, char ***envv)
}
enum {
HELP_BUTTON = 0,
CLOSE_BUTTON,
RUN_BUTTON
};
......@@ -205,11 +203,11 @@ run_dialog_response (GtkWidget *w, int response, gpointer data)
use_advanced = gnome_config_get_bool ("/panel/State/"ADVANCED_DIALOG_KEY"=false");
if (response == HELP_BUTTON) {
if (response == GTK_RESPONSE_HELP) {
panel_show_help ("specialobjects", "RUNBUTTON");
/* just return as we don't want to close */
return;
} else if (response == CLOSE_BUTTON) {
} else if (response == GTK_RESPONSE_CLOSE) {
goto return_and_close;
}
......@@ -1138,9 +1136,9 @@ show_run_dialog (void)
NULL /* parent */,
0 /* flags */,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_RESPONSE_HELP,
GTK_STOCK_CLOSE,
CLOSE_BUTTON,
GTK_RESPONSE_CLOSE,
/* FIXME: how the hell do we get a different label but
* the execute stock icon */
GTK_STOCK_EXECUTE,
......
......@@ -51,11 +51,7 @@ extern GlobalConfig global_config;
extern gboolean commie_mode;
enum {
HELP_BUTTON,
OK_BUTTON,
CANCEL_BUTTON,
REVERT_BUTTON,
CLOSE_BUTTON
REVERT_BUTTON
};
static void
......@@ -522,7 +518,7 @@ window_response (GtkWidget *w, int response, gpointer data)
{
Launcher *launcher = data;
if (response == HELP_BUTTON) {
if (response == GTK_RESPONSE_HELP) {
panel_show_help ("launchers", NULL);
} else if (response == REVERT_BUTTON) { /* revert */
gnome_ditem_edit_set_ditem (GNOME_DITEM_EDIT (launcher->dedit),
......@@ -549,12 +545,12 @@ create_properties_dialog (Launcher *launcher)
dialog = gtk_dialog_new_with_buttons (_("Launcher properties"),
NULL /* parent */,
0 /* flags */,
GTK_STOCK_CLOSE,
CLOSE_BUTTON,
GTK_STOCK_HELP,
GTK_RESPONSE_HELP,
GTK_STOCK_REVERT_TO_SAVED,
REVERT_BUTTON,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE,
NULL);
launcher->dedit = gnome_ditem_edit_new ();
......@@ -580,6 +576,7 @@ create_properties_dialog (Launcher *launcher)
G_CALLBACK (properties_close_callback),
launcher);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (window_response),
......@@ -648,7 +645,7 @@ really_add_launcher (GtkWidget *dialog, int response, gpointer data)
PanelWidget *panel = gtk_object_get_data(GTK_OBJECT(dialog),"panel");
GnomeDesktopItem *ditem;
if (response == OK_BUTTON) {
if (response == GTK_RESPONSE_OK) {
Launcher *launcher;
ditem = gnome_ditem_edit_get_ditem (dedit);
......@@ -659,7 +656,7 @@ really_add_launcher (GtkWidget *dialog, int response, gpointer data)
launcher_hoard (launcher);
panel_config_sync_schedule ();
} else if (response == HELP_BUTTON) {
} else if (response == GTK_RESPONSE_HELP) {
panel_show_help ("launchers", "LAUNCHERS");
/* just return as we don't want to close */
return;
......@@ -678,12 +675,12 @@ ask_about_launcher (const char *file, PanelWidget *panel, int pos, gboolean exac
dialog = gtk_dialog_new_with_buttons (_("Create launcher applet"),
NULL /* parent */,
0 /* flags */,
GTK_STOCK_HELP,
GTK_RESPONSE_HELP,
GTK_STOCK_CANCEL,
CANCEL_BUTTON,
GTK_RESPONSE_CANCEL,
GTK_STOCK_OK,
OK_BUTTON,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_RESPONSE_OK,
NULL);
gtk_window_set_wmclass (GTK_WINDOW (dialog),
......@@ -712,7 +709,7 @@ ask_about_launcher (const char *file, PanelWidget *panel, int pos, gboolean exac
G_CALLBACK (really_add_launcher),
dee);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), OK_BUTTON);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_widget_show_all (dialog);
......
......@@ -29,12 +29,6 @@
#include "menu-properties.h"
enum {
CLOSE_BUTTON,
HELP_BUTTON
};
#undef MENU_PROPERTIES_DEBUG
struct _MenuDialogInfo {
......@@ -395,9 +389,9 @@ dialog_response (GtkWidget *dialog, int response, gpointer data)
{
Menu *menu = data;
if (response == CLOSE_BUTTON) {
if (response == GTK_RESPONSE_CLOSE) {
gtk_widget_destroy (dialog);
} else if (response == HELP_BUTTON) {
} else if (response == GTK_RESPONSE_HELP) {
if (GTK_TOGGLE_BUTTON (menu->dialog_info->main_menu)->active)
panel_show_help ("mainmenu", "MAINMENUCONFIG");
else
......@@ -420,10 +414,10 @@ create_properties_dialog (Menu *menu)
dialog = gtk_dialog_new_with_buttons (_("Menu properties"),
NULL /* parent */,
0 /* flags */,
GTK_STOCK_CLOSE,
CLOSE_BUTTON,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_RESPONSE_HELP,
GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE,
NULL);
menu->prop_dialog = dialog;
......
......@@ -92,9 +92,7 @@ extern char *kde_icondir;
extern GtkTooltips *panel_tooltips;
enum {
HELP_BUTTON = 0,
REVERT_BUTTON,
CLOSE_BUTTON
REVERT_BUTTON
};
typedef struct _TearoffMenu TearoffMenu;
......@@ -710,10 +708,10 @@ add_new_app_to_menu (GtkWidget *widget, const char *item_loc)
dialog = gtk_dialog_new_with_buttons (_("Create menu item"),
NULL /* parent */,
0 /* flags */,
GTK_STOCK_OK,
GTK_RESPONSE_OK,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
GTK_STOCK_OK,
GTK_RESPONSE_OK,
NULL);
gtk_window_set_wmclass (GTK_WINDOW (dialog),
......@@ -1070,7 +1068,7 @@ ditem_properties_clicked (GtkWidget *w, int response, gpointer data)
GnomeDItemEdit *dee = gtk_object_get_user_data (GTK_OBJECT (w));
GnomeDesktopItem *ditem = data;
if (response == HELP_BUTTON) {
if (response == GTK_RESPONSE_HELP) {
panel_show_help ("launchers", NULL);
} else if (response == REVERT_BUTTON) {
if (ditem != NULL)
......@@ -1212,13 +1210,15 @@ edit_dentry (GtkWidget *widget, ShowItemMenu *sim)
NULL /* parent */,
0 /* flags */,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_RESPONSE_HELP,
GTK_STOCK_REVERT_TO_SAVED,
REVERT_BUTTON,
GTK_STOCK_CLOSE,
CLOSE_BUTTON,
GTK_RESPONSE_CLOSE,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
dedit = gnome_ditem_edit_new ();
gtk_widget_show (dedit);
......@@ -1287,11 +1287,11 @@ edit_direntry (GtkWidget *widget, ShowItemMenu *sim)
NULL /* parent */,
0 /* flags */,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_RESPONSE_HELP,
GTK_STOCK_REVERT_TO_SAVED,
REVERT_BUTTON,
GTK_STOCK_CLOSE,
CLOSE_BUTTON,
GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_wmclass (GTK_WINDOW (dialog),
......
......@@ -33,11 +33,6 @@
#include "multiscreen-stuff.h"
#include "xstuff.h"
enum {
HELP_BUTTON,
CLOSE_BUTTON
};
/*
* FIXME
*/
......@@ -1583,7 +1578,7 @@ window_response (GtkWidget *w, int response, gpointer data)
const char *help_path = gtk_object_get_data (GTK_OBJECT (w), "help_path");
const char *help_linkid = gtk_object_get_data (GTK_OBJECT (w), "help_linkid");
if (response == HELP_BUTTON) {
if (response == GTK_RESPONSE_HELP) {
int tab;
tab = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
......@@ -1644,10 +1639,10 @@ panel_config (GtkWidget *panel)
/* main window */
ppc->config_window = gtk_dialog_new_with_buttons (_("Panel properties"),
NULL, 0,
GTK_STOCK_CLOSE,
CLOSE_BUTTON,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_RESPONSE_HELP,
GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_wmclass (GTK_WINDOW (ppc->config_window),
"panel_properties", "Panel");
......
......@@ -33,10 +33,7 @@
#define DRAG_HANDLE_SIZE 10
enum {
OK_BUTTON,
HELP_BUTTON,
RELOAD_BUTTON,
CANCEL_BUTTON
RELOAD_BUTTON
};
GList *check_swallows = NULL;
......@@ -111,7 +108,7 @@ before_remove (Swallow *swallow)
gtk_dialog_add_button (GTK_DIALOG (dlg),
GTK_STOCK_CANCEL,
CANCEL_BUTTON);
GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (GTK_DIALOG (dlg),
_("Reload"),
RELOAD_BUTTON);
......@@ -210,10 +207,10 @@ really_add_swallow (GtkWidget *d, int response, gpointer data)
GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(d), "exactpos"));
switch (response) {
case CANCEL_BUTTON:
case GTK_RESPONSE_CANCEL:
gtk_widget_destroy (d);
return;
case HELP_BUTTON:
case GTK_RESPONSE_HELP:
panel_show_help ("specialobjects", "SWALLOWEDAPPS");
return;
default:
......@@ -256,12 +253,12 @@ ask_about_swallowing(PanelWidget *panel, int pos, gboolean exactpos)
d = gtk_dialog_new_with_buttons (_("Create swallow applet"),
NULL /* parent */,
0 /* flags */,
GTK_STOCK_HELP,
GTK_RESPONSE_HELP,
GTK_STOCK_CANCEL,
CANCEL_BUTTON,
GTK_RESPONSE_CANCEL,
GTK_STOCK_OK,
OK_BUTTON,
GTK_STOCK_HELP,
HELP_BUTTON,
GTK_RESPONSE_OK,
NULL);
gtk_window_set_wmclass (GTK_WINDOW (d),
"create_swallow", "Panel");
......@@ -325,7 +322,7 @@ ask_about_swallowing(PanelWidget *panel, int pos, gboolean exactpos)
gtk_object_set_data(GTK_OBJECT(d),"height_s",height_s);
gtk_dialog_set_default_response (GTK_DIALOG (d), OK_BUTTON);
gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_OK);
gtk_widget_grab_focus(title_e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment