[geany/geany-plugins] d991a2: Merge pull request #410 from sardemff7/wip/gtk3-support

Frank Lanitz git-noreply at xxxxx
Sat Mar 26 11:54:49 UTC 2016


Branch:      refs/heads/master
Author:      Frank Lanitz <frank at frank.uvena.de>
Committer:   Frank Lanitz <frank at frank.uvena.de>
Date:        Sat, 26 Mar 2016 11:54:49 UTC
Commit:      d991a22705cd0b7c27652200c4b1ca9e9d587968
             https://github.com/geany/geany-plugins/commit/d991a22705cd0b7c27652200c4b1ca9e9d587968

Log Message:
-----------
Merge pull request #410 from sardemff7/wip/gtk3-support

GTK+3 support for more plugins


Modified Paths:
--------------
    build/geanylatex.m4
    build/geanymacro.m4
    build/geanynumberedbookmarks.m4
    build/geanyprj.m4
    geanylatex/src/bibtex.c
    geanylatex/src/geanylatex.c
    geanylatex/src/latexenvironments.c
    geanylatex/src/reftex.c
    geanylatex/src/templates.c
    geanymacro/src/geanymacro.c
    geanynumberedbookmarks/src/geanynumberedbookmarks.c
    geanyprj/src/menu.c

Modified: build/geanylatex.m4
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -1,7 +1,6 @@
 AC_DEFUN([GP_CHECK_GEANYLATEX],
 [
     GP_ARG_DISABLE([GeanyLaTeX], [auto])
-    GP_CHECK_PLUGIN_GTK2_ONLY([GeanyLaTeX])
     GP_COMMIT_PLUGIN_STATUS([GeanyLaTeX])
     AC_CONFIG_FILES([
         geanylatex/Makefile


Modified: build/geanymacro.m4
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -1,7 +1,6 @@
 AC_DEFUN([GP_CHECK_GEANYMACRO],
 [
     GP_ARG_DISABLE([GeanyMacro], [auto])
-    GP_CHECK_PLUGIN_GTK2_ONLY([GeanyMacro])
     GP_COMMIT_PLUGIN_STATUS([GeanyMacro])
     AC_CONFIG_FILES([
         geanymacro/Makefile


Modified: build/geanynumberedbookmarks.m4
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -1,7 +1,6 @@
 AC_DEFUN([GP_CHECK_GEANYNUMBEREDBOOKMARKS],
 [
     GP_ARG_DISABLE([GeanyNumberedBookmarks], [auto])
-    GP_CHECK_PLUGIN_GTK2_ONLY([GeanyNumberedBookmarks])
     GP_COMMIT_PLUGIN_STATUS([GeanyNumberedBookmarks])
     AC_CONFIG_FILES([
         geanynumberedbookmarks/Makefile


Modified: build/geanyprj.m4
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -1,7 +1,6 @@
 AC_DEFUN([GP_CHECK_GEANYPRJ],
 [
     GP_ARG_DISABLE([GeanyPrj], [auto])
-    GP_CHECK_PLUGIN_GTK2_ONLY([GeanyPrj])
     GP_COMMIT_PLUGIN_STATUS([GeanyPrj])
     AC_CONFIG_FILES([
         geanyprj/Makefile


Modified: geanylatex/src/bibtex.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -218,7 +218,7 @@ void glatex_parse_bib_file(const gchar* file, gpointer combobox)
 				{
 					tmp = glatex_parseLine_bib(bib_entries[i]);
 					tmp_label_name = g_strdup(tmp->label_name);
-					gtk_combo_box_append_text(GTK_COMBO_BOX(combobox), tmp_label_name);
+					gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combobox), tmp_label_name);
 					g_free(tmp);
 					g_free(tmp_label_name);
 				}


Modified: geanylatex/src/geanylatex.c
73 lines changed, 38 insertions(+), 35 deletions(-)
===================================================================
@@ -304,10 +304,10 @@ plugin_configure(GtkDialog * dialog)
 	config_widgets.lower_selection_on_smallcaps = gtk_check_button_new_with_label(
 		_("Lower selection when formatting smallcaps (\\textsc{})"));
 
-	config_widgets.glatex_autocompletion_active = gtk_combo_box_new_text();
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(config_widgets.glatex_autocompletion_active), 0,
+	config_widgets.glatex_autocompletion_active = gtk_combo_box_text_new();
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(config_widgets.glatex_autocompletion_active), 0,
 		_("Don't care about this inside plugin"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(config_widgets.glatex_autocompletion_active), 1,
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(config_widgets.glatex_autocompletion_active), 1,
 		_("Always perform autocompletion on LaTeX"));
 
 	/* Configuration for auto completion feature */
@@ -912,7 +912,7 @@ glatex_insert_ref_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 	gtk_table_set_row_spacings(GTK_TABLE(table), 6);
 
 	label_ref = gtk_label_new(_("Reference name:"));
-	textbox_ref = gtk_combo_box_entry_new_text();
+	textbox_ref = gtk_combo_box_text_new_with_entry();
 
 	if (doc->real_path != NULL)
 	{
@@ -964,8 +964,8 @@ glatex_insert_ref_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 		gchar *ref_string = NULL;
 		GString *template_string = NULL;
 
-		ref_string = g_strdup(gtk_combo_box_get_active_text(
-			GTK_COMBO_BOX(textbox_ref)));
+		ref_string = g_strdup(gtk_combo_box_text_get_active_text(
+			GTK_COMBO_BOX_TEXT(textbox_ref)));
 
 		if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio1)) == TRUE)
 		{
@@ -1277,7 +1277,7 @@ on_insert_bibtex_dialog_activate(G_GNUC_UNUSED GtkMenuItem *menuitem,
 	gtk_table_set_row_spacings(GTK_TABLE(table), 6);
 
 	label = gtk_label_new(_("BibTeX reference name:"));
-	textbox = gtk_combo_box_entry_new_text();
+	textbox = gtk_combo_box_text_new_with_entry();
 
 	if (doc->real_path != NULL)
 	{
@@ -1325,8 +1325,8 @@ on_insert_bibtex_dialog_activate(G_GNUC_UNUSED GtkMenuItem *menuitem,
 		gchar *ref_string = NULL;
 		GString *template_string = NULL;
 
-		ref_string = g_strdup(gtk_combo_box_get_active_text(
-			GTK_COMBO_BOX(textbox)));
+		ref_string = g_strdup(gtk_combo_box_text_get_active_text(
+			GTK_COMBO_BOX_TEXT(textbox)));
 
 		if (ref_string != NULL)
 		{
@@ -1388,8 +1388,8 @@ on_wizard_response(G_GNUC_UNUSED GtkDialog *dialog, gint response,
 			enc_latex_char = g_strconcat("\\usepackage[",
 				latex_encodings[encoding_int].latex,"]{inputenc}\n", NULL);
 		}
-		fontsize = gtk_combo_box_get_active_text(
-			GTK_COMBO_BOX(glatex_wizard.fontsize_combobox));
+		fontsize = gtk_combo_box_text_get_active_text(
+			GTK_COMBO_BOX_TEXT(glatex_wizard.fontsize_combobox));
 		author = g_strdup(gtk_entry_get_text(GTK_ENTRY(glatex_wizard.author_textbox)));
 		date = g_strdup(gtk_entry_get_text(GTK_ENTRY(glatex_wizard.date_textbox)));
 		title = g_strdup(gtk_entry_get_text(GTK_ENTRY(glatex_wizard.title_textbox)));
@@ -1753,7 +1753,7 @@ glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 	 *  adds default one */
 	label_template = gtk_label_new(_("Template:"));
 
-	glatex_wizard.template_combobox = gtk_combo_box_new_text();
+	glatex_wizard.template_combobox = gtk_combo_box_text_new();
 	gtk_widget_set_tooltip_text(glatex_wizard.template_combobox,
 		_("Set the template which should be used for creating the new document"));
 	gtk_misc_set_alignment(GTK_MISC(label_template), 0, 0.5);
@@ -1763,7 +1763,7 @@ glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 
 	/*  Adding default/build in templates to pull down and set the generic
 	 * 	one as default */
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.template_combobox),
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.template_combobox),
 		LATEX_WIZARD_TEMPLATE_DEFAULT, _("Default"));
 	gtk_combo_box_set_active(GTK_COMBO_BOX(glatex_wizard.template_combobox),
 		LATEX_WIZARD_TEMPLATE_DEFAULT);
@@ -1776,18 +1776,18 @@ glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 
 	/*  Documentclass */
 	label_documentclass = gtk_label_new(_("Documentclass:"));
-	glatex_wizard.documentclass_combobox = gtk_combo_box_new_text();
+	glatex_wizard.documentclass_combobox = gtk_combo_box_text_new();
 	gtk_widget_set_tooltip_text(glatex_wizard.documentclass_combobox,
 		_("Choose the kind of document you want to write"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.documentclass_combobox), 0,
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.documentclass_combobox), 0,
 		_("Book"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.documentclass_combobox), 1,
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.documentclass_combobox), 1,
 		_("Article"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.documentclass_combobox), 2,
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.documentclass_combobox), 2,
 		_("Report"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.documentclass_combobox), 3,
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.documentclass_combobox), 3,
 		_("Letter"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.documentclass_combobox), 4,
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.documentclass_combobox), 4,
 		_("Presentation"));
 
 	gtk_combo_box_set_active(GTK_COMBO_BOX(glatex_wizard.documentclass_combobox), 0);
@@ -1800,12 +1800,12 @@ glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 	/*  Encoding */
 	label_encoding = gtk_label_new(_("Encoding:"));
 
-	glatex_wizard.encoding_combobox = gtk_combo_box_new_text();
+	glatex_wizard.encoding_combobox = gtk_combo_box_text_new();
 	gtk_widget_set_tooltip_text(glatex_wizard.encoding_combobox,
 		_("Set the encoding for your new document"));
 	for (i = 0; i < LATEX_ENCODINGS_MAX; i++)
 	{
-		gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.encoding_combobox), i,
+		gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.encoding_combobox), i,
 					  latex_encodings[i].name);
 	}
 
@@ -1819,10 +1819,10 @@ glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 
 	/*  fontsize */
 	label_fontsize = gtk_label_new(_("Font size"));
-	glatex_wizard.fontsize_combobox = gtk_combo_box_entry_new_text();
-	gtk_combo_box_append_text(GTK_COMBO_BOX(glatex_wizard.fontsize_combobox),"10pt");
-	gtk_combo_box_append_text(GTK_COMBO_BOX(glatex_wizard.fontsize_combobox),"11pt");
-	gtk_combo_box_append_text(GTK_COMBO_BOX(glatex_wizard.fontsize_combobox),"12pt");
+	glatex_wizard.fontsize_combobox = gtk_combo_box_text_new_with_entry();
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(glatex_wizard.fontsize_combobox),"10pt");
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(glatex_wizard.fontsize_combobox),"11pt");
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(glatex_wizard.fontsize_combobox),"12pt");
 	gtk_widget_set_tooltip_text(glatex_wizard.fontsize_combobox,
 		_("Set the default font size of your new document"));
 
@@ -1881,12 +1881,12 @@ glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 
 	/*  Papersize */
 	label_papersize = gtk_label_new(_("Paper size:"));
-	glatex_wizard.papersize_combobox = gtk_combo_box_new_text();
+	glatex_wizard.papersize_combobox = gtk_combo_box_text_new();
 	gtk_widget_set_tooltip_text(glatex_wizard.papersize_combobox,
 		_("Choose the paper format for the newly created document"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.papersize_combobox), 0, "A4");
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.papersize_combobox), 1, "A5");
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.papersize_combobox), 2, "A6");
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.papersize_combobox), 0, "A4");
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.papersize_combobox), 1, "A5");
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.papersize_combobox), 2, "A6");
 
 	gtk_combo_box_set_active(GTK_COMBO_BOX(glatex_wizard.papersize_combobox), 0);
 
@@ -1897,12 +1897,12 @@ glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
 
 	/* Paper direction */
 	label_orientation = gtk_label_new(_("Paper Orientation:"));
-	glatex_wizard.orientation_combobox = gtk_combo_box_new_text();
+	glatex_wizard.orientation_combobox = gtk_combo_box_text_new();
 	gtk_widget_set_tooltip_text(glatex_wizard.orientation_combobox,
 		_("Choose the paper orientation for the newly created document"));
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.orientation_combobox), 0, "Default");
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.orientation_combobox), 1, "Portrait");
-	gtk_combo_box_insert_text(GTK_COMBO_BOX(glatex_wizard.orientation_combobox), 2, "Landscape");
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.orientation_combobox), 0, "Default");
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.orientation_combobox), 1, "Portrait");
+	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(glatex_wizard.orientation_combobox), 2, "Landscape");
 
 	gtk_combo_box_set_active(GTK_COMBO_BOX(glatex_wizard.orientation_combobox), 0);
 
@@ -2118,6 +2118,7 @@ add_menu_to_menubar(void)
 	GtkWidget *tmp = NULL;
 	gint i;
 	GtkMenuShell *menubar;
+	GList *menubar_children;
 
 	/* First we check for the menubar where to add the LaTeX menu */
 	menubar = GTK_MENU_SHELL(
@@ -2128,8 +2129,9 @@ add_menu_to_menubar(void)
 	{
 		/* Build up menu for menubar */
 		menu_latex = gtk_menu_item_new_with_mnemonic(_("_LaTeX"));
+		menubar_children = gtk_container_get_children(GTK_CONTAINER(menubar));
 		gtk_menu_shell_insert(
-			menubar, menu_latex, g_list_length(menubar->children)-1);
+			menubar, menu_latex, g_list_length(menubar_children)-1);
 
 		menu_latex_menu = gtk_menu_new();
 		gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_latex), menu_latex_menu);
@@ -2278,8 +2280,9 @@ add_menu_to_menubar(void)
 	if (menu_bibtex == NULL)
 	{
 		menu_bibtex = gtk_menu_item_new_with_mnemonic(_("_BibTeX"));
+		menubar_children = gtk_container_get_children(GTK_CONTAINER(menubar));
 		gtk_menu_shell_insert(
-			menubar, menu_bibtex, g_list_length(menubar->children)-1);
+			menubar, menu_bibtex, g_list_length(menubar_children)-1);
 
 		menu_bibtex_menu = gtk_menu_new();
 		gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_bibtex), menu_bibtex_menu);


Modified: geanylatex/src/latexenvironments.c
8 lines changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -206,12 +206,12 @@ glatex_insert_environment_dialog(G_GNUC_UNUSED GtkMenuItem *menuitem,
 	gtk_table_set_row_spacings(GTK_TABLE(table), 6);
 
 	label_env = gtk_label_new(_("Environment:"));
-	textbox_env = gtk_combo_box_entry_new_text();
+	textbox_env = gtk_combo_box_text_new_with_entry();
 
 	max = glatex_count_menu_entries(glatex_environment_array, -1);
 	for (i = 0; i < max; i++)
 	{
-		gtk_combo_box_append_text(GTK_COMBO_BOX(textbox_env),
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(textbox_env),
 								  glatex_environment_array[i].label);
 	}
 
@@ -235,8 +235,8 @@ glatex_insert_environment_dialog(G_GNUC_UNUSED GtkMenuItem *menuitem,
 	{
 		gchar *env_string = NULL;
 
-		env_string = g_strdup(gtk_combo_box_get_active_text(
-			GTK_COMBO_BOX(textbox_env)));
+		env_string = g_strdup(gtk_combo_box_text_get_active_text(
+			GTK_COMBO_BOX_TEXT(textbox_env)));
 
 		if (env_string != NULL)
 		{


Modified: geanylatex/src/reftex.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -46,7 +46,7 @@ void glatex_parse_aux_file(gchar *file, gpointer combobox)
 				{
 					tmp = glatex_parseLine(aux_entries[i]);
 					tmp_label_name = g_strdup(tmp->label_name);
-					gtk_combo_box_append_text(GTK_COMBO_BOX(combobox), tmp_label_name);
+					gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combobox), tmp_label_name);
 					g_free(tmp);
 					g_free(tmp_label_name);
 				}


Modified: geanylatex/src/templates.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -102,7 +102,7 @@ void glatex_add_templates_to_combobox(GPtrArray *templates, GtkWidget *combobox)
 	for (i = 0; i < templates->len; i++)
 	{
 		tmp = g_ptr_array_index(templates,i);
-		gtk_combo_box_append_text(GTK_COMBO_BOX(combobox),
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combobox),
 			tmp->label);
 	}
 }


Modified: geanymacro/src/geanymacro.c
24 lines changed, 12 insertions(+), 12 deletions(-)
===================================================================
@@ -901,7 +901,7 @@ NULL);
 								GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_add_with_viewport((GtkScrolledWindow*)scroll,label);
 
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),scroll);
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),scroll);
 	gtk_widget_show(scroll);
 
 	/* set dialog size (leave width default) */
@@ -1065,7 +1065,7 @@ static gboolean InitializeMacroRecord(void)
 
 	/* create box to hold macro trigger entry box and label */
 	hbox=gtk_hbox_new(FALSE,0);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),hbox);
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),hbox);
 	gtk_widget_show(hbox);
 
 	gtkl=gtk_label_new(_("Macro Trigger:"));
@@ -1079,7 +1079,7 @@ static gboolean InitializeMacroRecord(void)
 
 	/* create box to hold macro name entry box, and label */
 	hbox=gtk_hbox_new(FALSE,0);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),hbox);
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),hbox);
 	gtk_widget_show(hbox);
 
 	gtkl=gtk_label_new(_("Macro Name:"));
@@ -1395,14 +1395,14 @@ static void EditSearchOptions(GtkTreeModel *model,GtkTreeIter *iter)
 
 	/* create box to hold widgets */
 	vbox=gtk_vbox_new(FALSE, 6);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),vbox);
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),vbox);
 	gtk_widget_show(vbox);
 
 	/* create combobox to hold search direction */
-	gtkcb=gtk_combo_box_new_text();
-	gtk_combo_box_append_text((GtkComboBox*)gtkcb,_("Search Forwards"));
-	gtk_combo_box_append_text((GtkComboBox*)gtkcb,_("Search Backwards"));
-	gtk_combo_box_set_active((GtkComboBox*)gtkcb,(mde->message==SCI_SEARCHNEXT)?0:1);
+	gtkcb=gtk_combo_box_text_new();
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkcb),_("Search Forwards"));
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkcb),_("Search Backwards"));
+	gtk_combo_box_set_active(GTK_COMBO_BOX(gtkcb),(mde->message==SCI_SEARCHNEXT)?0:1);
 	gtk_box_pack_start(GTK_BOX(vbox),gtkcb,FALSE,FALSE,2);
 	gtk_widget_show(gtkcb);
 
@@ -1538,7 +1538,7 @@ static void EditSCIREPLACESELText(GtkTreeModel *model,GtkTreeIter *iter)
 
 	/* create box to hold macro name entry box, and label */
 	hbox=gtk_hbox_new(FALSE,0);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),hbox);
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),hbox);
 	gtk_widget_show(hbox);
 
 	gtkl=gtk_label_new(_("Text:"));
@@ -1808,8 +1808,8 @@ static void EditMacroElements(Macro *m)
 	                            GTK_SELECTION_SINGLE);
 
 	/* add table to dialog */
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),table);
-/*	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),table,FALSE,FALSE,2);*/
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),table);
+/*	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),table,FALSE,FALSE,2);*/
 	gtk_widget_show(table);
 
 	/* add buttons */
@@ -2109,7 +2109,7 @@ static void DoEditMacro(GtkMenuItem *menuitem, gpointer gdata)
 	                            GTK_SELECTION_SINGLE);
 
 	/* add table to dialog */
-	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),table,FALSE,FALSE,2);
+	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),table,FALSE,FALSE,2);
 	gtk_widget_show(table);
 
 	/* add buttons */


Modified: geanynumberedbookmarks/src/geanynumberedbookmarks.c
28 lines changed, 14 insertions(+), 14 deletions(-)
===================================================================
@@ -377,7 +377,7 @@ static gboolean SaveIndividualSetting(GKeyFile *gkf,FileData *fd,gint iNumber,gc
 	/* i==10 if no markers set */
 
 	/* skip if no folding data or markers */
-	if(i==10 && (bRememberFolds==FALSE || fd->pcFolding==NULL) && 
+	if(i==10 && (bRememberFolds==FALSE || fd->pcFolding==NULL) &&
 	   (bRememberBookmarks==FALSE || fd->pcBookmarks==NULL))
 		return FALSE;
 
@@ -863,7 +863,7 @@ static gint NextFreeMarker(GeanyDocument* doc)
 		l=scintilla_send_message(sci,SCI_MARKERSYMBOLDEFINED,m,0);
 		if(l==SC_MARK_CIRCLE || l==SC_MARK_AVAILABLE)
 			return m;
-	}	
+	}
 
 	/* no empty markers available so return -1 */
 	/* in theory shouldn't get here but leave just in case my logic is flawed */
@@ -1231,19 +1231,19 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
 	/* save pointer to check_button */
 	g_object_set_data(G_OBJECT(dialog),"Geany_Numbered_Bookmarks_cb2",gtkw);
 
-	gtkw=gtk_combo_box_new_text();
-	gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to start of line"));
-	gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to remembered position in line"));
-	gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to position in current line"));
-	gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Move to End of line"));
-	gtk_combo_box_set_active((GtkComboBox*)gtkw,PositionInLine);
+	gtkw=gtk_combo_box_text_new();
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to start of line"));
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to remembered position in line"));
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to position in current line"));
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Move to End of line"));
+	gtk_combo_box_set_active(GTK_COMBO_BOX(gtkw),PositionInLine);
 	gtk_box_pack_start(GTK_BOX(vbox),gtkw,FALSE,FALSE,2);
 	g_object_set_data(G_OBJECT(dialog),"Geany_Numbered_Bookmarks_cb3",gtkw);
 
-	gtkw=gtk_combo_box_new_text();
-	gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Save file settings with program settings"));
-	gtk_combo_box_append_text((GtkComboBox*)gtkw,_("Save file settings to filename with suffix"));
-	gtk_combo_box_set_active((GtkComboBox*)gtkw,WhereToSaveFileDetails);
+	gtkw=gtk_combo_box_text_new();
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Save file settings with program settings"));
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(gtkw),_("Save file settings to filename with suffix"));
+	gtk_combo_box_set_active(GTK_COMBO_BOX(gtkw),WhereToSaveFileDetails);
 	gtk_box_pack_start(GTK_BOX(vbox),gtkw,FALSE,FALSE,2);
 	g_object_set_data(G_OBJECT(dialog),"Geany_Numbered_Bookmarks_cb4",gtkw);
 
@@ -1291,7 +1291,7 @@ will move the bookmark there if it was set on a different line, or create it if
 	                               GTK_POLICY_AUTOMATIC);
 	gtk_scrolled_window_add_with_viewport((GtkScrolledWindow*)scroll,label);
 
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),scroll);
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),scroll);
 	gtk_widget_show(scroll);
 
 	/* set dialog size (leave width default) */
@@ -1363,7 +1363,7 @@ static void GotoBookMark(GeanyDocument* doc, gint iBookMark)
 	/* make sure view is not beyond start or end of document */
 	if(iLine+iLinesVisible>iLineCount)
 		iLine=iLineCount-iLinesVisible;
-		
+
 	if(iLine<0)
 		iLine=0;
 


Modified: geanyprj/src/menu.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -180,9 +180,9 @@ static PropertyDialogElements *build_properties_dialog(gboolean properties)
 	label = gtk_label_new(_("Type:"));
 	gtk_misc_set_alignment(GTK_MISC(label), 1, 0);
 
-	e->type = gtk_combo_box_new_text();
+	e->type = gtk_combo_box_text_new();
 	for (i = 0; i < NEW_PROJECT_TYPE_SIZE; i++)
-		gtk_combo_box_append_text(GTK_COMBO_BOX(e->type), project_type_string[i]);
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(e->type), project_type_string[i]);
 	gtk_combo_box_set_active(GTK_COMBO_BOX(e->type), 0);
 
 	ui_table_add_row(GTK_TABLE(table), 4, label, e->type, NULL);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list