Revision: 1535 http://svn.sourceforge.net/geany/?rev=1535&view=rev Author: eht16 Date: 2007-05-15 08:16:16 -0700 (Tue, 15 May 2007)
Log Message: ----------- Added many widget names to different dialogs for use with custom styles. Menu items still don't work.
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.docbook trunk/src/about.c trunk/src/build.c trunk/src/dialogs.c trunk/src/keybindings.c trunk/src/project.c trunk/src/symbols.c trunk/src/tools.c trunk/src/ui_utils.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/ChangeLog 2007-05-15 15:16:16 UTC (rev 1535) @@ -5,6 +5,10 @@ * doc/geany.docbook, src/callbacks.c: Hide notebooks tabs instead of sidebar when toggling additional widgets. + * doc/geany.docbook, src/about.c, src/build.c, src/dialogs.c, + src/keybindings.c, src/project.c, src/symbols.c, src/tools.c, + src/ui_utils.c: Added many widget names to different dialogs for use + with custom styles. Menu items still don't work.
2007-05-14 Nick Treleaven nick.treleaven@btinternet.com
Modified: trunk/doc/geany.docbook =================================================================== --- trunk/doc/geany.docbook 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/doc/geany.docbook 2007-05-15 15:16:16 UTC (rev 1535) @@ -421,7 +421,7 @@ <para> You can define your widget style for many of <application>Geany</application>'s GUI parts. To do this, just edit your <filename>.gtkrc-2.0</filename> (usually - found in your home directory on UNIX-like systems and in the etc subdirecory + found in your home directory on UNIX-like systems and in the etc subdirectory of your <application>Geany</application> installation on Windows). </para> <para> @@ -447,8 +447,17 @@ <para>GeanyToolbarMenu</para> </listitem> <listitem> - <para>GeanyPrefsDialog</para> + <para>GeanyDialog</para> </listitem> + <listitem> + <para>GeanyDialogPrefs</para> + </listitem> + <listitem> + <para>GeanyDialogProject</para> + </listitem> + <listitem> + <para>GeanyDialogSearch</para> + </listitem> </orderedlist> </para> <para>Example of a simple .gtkrc-2.0:
Modified: trunk/src/about.c =================================================================== --- trunk/src/about.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/about.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -124,6 +124,7 @@ gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(app->window)); gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_title(GTK_WINDOW(dialog), _("About Geany")); + gtk_widget_set_name(dialog, "GeanyDialog"); button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE); gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/build.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -1302,6 +1302,7 @@ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); + gtk_widget_set_name(dialog, "GeanyDialog");
label = gtk_label_new(_("Set programs and options for compiling and viewing (La)TeX files.")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); @@ -1470,6 +1471,7 @@ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); + gtk_widget_set_name(dialog, "GeanyDialog");
label = gtk_label_new(_("Set the commands for building and running programs.")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/dialogs.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -84,6 +84,7 @@ gtk_tooltips_set_tip(tooltips, viewbtn, _("Opens the file in read-only mode. If you choose more than one file to open, all files will be opened read-only."), NULL); gtk_widget_show(viewbtn); + gtk_widget_set_name(app->open_filesel, "GeanyDialog"); gtk_dialog_add_action_widget(GTK_DIALOG(app->open_filesel), viewbtn, GTK_RESPONSE_APPLY); gtk_dialog_add_buttons(GTK_DIALOG(app->open_filesel), @@ -274,6 +275,7 @@ gtk_window_set_skip_taskbar_hint(GTK_WINDOW(app->save_filesel), TRUE); gtk_window_set_type_hint(GTK_WINDOW(app->save_filesel), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_dialog_set_default_response(GTK_DIALOG(app->save_filesel), GTK_RESPONSE_ACCEPT); + gtk_widget_set_name(app->save_filesel, "GeanyDialog");
g_signal_connect((gpointer) app->save_filesel, "delete_event", G_CALLBACK(gtk_widget_hide_on_delete), NULL); @@ -334,6 +336,7 @@ #else dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, type, GTK_BUTTONS_OK, "%s", string); + gtk_widget_set_name(dialog, "GeanyDialog"); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); #endif @@ -421,6 +424,7 @@ gtk_window_set_destroy_with_parent(GTK_WINDOW(app->open_fontsel), TRUE); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(app->open_fontsel), TRUE); gtk_window_set_type_hint(GTK_WINDOW(app->open_fontsel), GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_widget_set_name(app->open_fontsel, "GeanyDialog");
gtk_widget_show(GTK_FONT_SELECTION_DIALOG(app->open_fontsel)->apply_button);
@@ -457,6 +461,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); + gtk_widget_set_name(dialog, "GeanyDialog");
if (sci_can_copy(doc_list[idx].sci)) { @@ -550,6 +555,7 @@ if (app->open_colorsel == NULL) { app->open_colorsel = gtk_color_selection_dialog_new(_("Color Chooser")); + gtk_widget_set_name(app->open_colorsel, "GeanyDialog"); gtk_window_set_transient_for(GTK_WINDOW(app->open_colorsel), GTK_WINDOW(app->window));
g_signal_connect(GTK_COLOR_SELECTION_DIALOG(app->open_colorsel)->cancel_button, "clicked", @@ -589,6 +595,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); + gtk_widget_set_name(dialog, "GeanyDialog"); gtk_box_set_spacing(GTK_BOX(vbox), 6);
label = gtk_label_new(label_text); @@ -621,6 +628,7 @@ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); + gtk_widget_set_name(dialog, "GeanyDialog");
label = gtk_label_new(_("Enter the line you want to go to:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); @@ -712,6 +720,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, NULL); g_free(title); + gtk_widget_set_name(dialog, "GeanyDialog"); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog));
g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); @@ -1023,12 +1032,13 @@ dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", question_text); + gtk_widget_set_name(dialog, "GeanyDialog"); // question_text will be in bold if optional extra_text used if (extra_text != NULL) gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", extra_text);
- // For a cancel button, use cancel reponse so user can press escape to cancel + // For a cancel button, use cancel response so user can press escape to cancel gtk_dialog_add_button(GTK_DIALOG(dialog), no_btn, utils_str_equal(no_btn, GTK_STOCK_CANCEL) ? GTK_RESPONSE_CANCEL : GTK_RESPONSE_NO); gtk_dialog_add_button(GTK_DIALOG(dialog), yes_btn, GTK_RESPONSE_YES);
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/keybindings.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -521,6 +521,7 @@ GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); gtk_box_set_spacing(GTK_BOX(vbox), 6); + gtk_widget_set_name(dialog, "GeanyDialog");
height = GEANY_WINDOW_MINIMAL_HEIGHT; gtk_window_set_default_size(GTK_WINDOW(dialog), height * 0.8, height);
Modified: trunk/src/project.c =================================================================== --- trunk/src/project.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/project.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -105,6 +105,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
+ gtk_widget_set_name(e->dialog, "GeanyDialogProject"); bbox = gtk_hbox_new(FALSE, 0); button = gtk_button_new(); image = gtk_image_new_from_stock("gtk-new", GTK_ICON_SIZE_BUTTON); @@ -246,6 +247,7 @@ GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + gtk_widget_set_name(dialog, "GeanyDialogProject");
// set default Open, so pressing enter can open multiple files gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); @@ -317,6 +319,7 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); gtk_dialog_add_buttons(GTK_DIALOG(e->dialog), GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + gtk_widget_set_name(e->dialog, "GeanyDialogProject");
vbox = ui_dialog_vbox_new(GTK_DIALOG(e->dialog));
@@ -672,6 +675,7 @@ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); + gtk_widget_set_name(dialog, "GeanyDialogProject"); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), TRUE); gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); @@ -700,6 +704,7 @@ GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + gtk_widget_set_name(dialog, "GeanyDialog"); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), TRUE); gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
Modified: trunk/src/symbols.c =================================================================== --- trunk/src/symbols.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/symbols.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -798,6 +798,7 @@ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); + gtk_widget_set_name(dialog, "GeanyDialog"); filter = gtk_file_filter_new(); gtk_file_filter_set_name(filter, _("Geany tag files (*.tags)")); gtk_file_filter_add_pattern(filter, "*.tags");
Modified: trunk/src/tools.c =================================================================== --- trunk/src/tools.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/tools.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -83,6 +83,7 @@ _("_Insert"), GTK_RESPONSE_OK, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(sc_dialog)); gtk_box_set_spacing(GTK_BOX(vbox), 6); + gtk_widget_set_name(sc_dialog, "GeanyDialog");
height = GEANY_WINDOW_MINIMAL_HEIGHT; gtk_window_set_default_size(GTK_WINDOW(sc_dialog), height * 0.8, height); @@ -662,6 +663,7 @@ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); gtk_box_set_spacing(GTK_BOX(vbox), 6); + gtk_widget_set_name(dialog, "GeanyDialog");
label = gtk_label_new(_("You can send the current selection to any of these commands and the output of the command replaces the current selection.")); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2007-05-15 13:02:23 UTC (rev 1534) +++ trunk/src/ui_utils.c 2007-05-15 15:16:16 UTC (rev 1535) @@ -1187,6 +1187,7 @@ gchar *locale_path; gchar *ret_path = NULL;
+ gtk_widget_set_name(dialog, "GeanyDialog"); locale_path = utils_get_locale_from_utf8(utf8_path); if (action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.