[Github-comments] [geany/geany-plugins] Workbench (#598)
Colomban Wendling
notifications at xxxxx
Sun Aug 20 00:46:11 UTC 2017
b4n requested changes on this pull request.
> @@ -3405,7 +3405,7 @@ msgstr ""
msgid "Toggle Insert/Overwrite mode"
There is no relevant changes in this file
> @@ -3344,7 +3344,7 @@ msgstr "Cancel·la la la Selecció"
msgid "Toggle Insert/Overwrite mode"
Nor in this one (and probably quite a few translation files)
> +
+
+/** Setup the workbench menu.
+ *
+ **/
+gboolean menu_init(void)
+{
+ /* Create menu and root item/label */
+ menu_data.menu = gtk_menu_new();
+ menu_data.root_item = gtk_menu_item_new_with_label(_("Workbench"));
+ gtk_widget_show(menu_data.root_item);
+
+ /* Create new menu item "New Workbench" */
+ menu_data.item_new = gtk_menu_item_new_with_mnemonic(_("_New"));
+ gtk_widget_show(menu_data.item_new);
+ gtk_menu_append(GTK_MENU (menu_data.menu), menu_data.item_new);
[`gtk_menu_append()`](https://developer.gnome.org/gtk2/stable/GtkMenu.html#gtk-menu-append) is deprecated for a long time in favor to [`gtk_menu_shell_append()`](https://developer.gnome.org/gtk2/stable/GtkMenuShell.html#gtk-menu-shell-append), and its use [breaks compilation under GTK3](https://travis-ci.org/geany/geany-plugins/jobs/266322308#L4962) which removed the former.
> +} MatchType;
+
+typedef struct
+{
+ GeanyProject *project;
+ GPtrArray *expanded_paths;
+} ExpandData;
+
+typedef struct SIDEBAR
+{
+ GtkWidget *file_view_vbox;
+ GtkWidget *file_view;
+ GtkTreeStore *file_store;
+ GtkWidget *file_view_label;
+}SIDEBAR;
+static SIDEBAR sidebar = {NULL, NULL, NULL, NULL, NULL};
[Excess initializer](https://travis-ci.org/geany/geany-plugins/jobs/266322308#L4946) (there are 4 fields, and you initialize 5).
> + gtk_tree_view_column_pack_start(column, renderer, FALSE);
+ gtk_tree_view_column_add_attribute(column, renderer, "gicon", FILEVIEW_COLUMN_ICON);
+
+ renderer = gtk_cell_renderer_text_new();
+ gtk_tree_view_column_pack_start(column, renderer, TRUE);
+ gtk_tree_view_column_add_attribute(column, renderer, "markup", FILEVIEW_COLUMN_NAME);
+
+ gtk_tree_view_append_column(GTK_TREE_VIEW(sidebar.file_view), column);
+
+ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(sidebar.file_view), FALSE);
+ gtk_tree_view_set_enable_search(GTK_TREE_VIEW(sidebar.file_view), TRUE);
+ gtk_tree_view_set_search_column(GTK_TREE_VIEW(sidebar.file_view), FILEVIEW_COLUMN_NAME);
+
+ pfd = pango_font_description_from_string(wb_globals.geany_plugin->geany_data->interface_prefs->tagbar_font);
+ gtk_widget_modify_font(sidebar.file_view, pfd);
+ pango_font_description_free(pfd);
you could use `ui_widget_modify_font_from_string()` from Geany's utility function (which also would avoid the [GTK3 deprecation warning](https://travis-ci.org/geany/geany-plugins/jobs/266322308#L4954))
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/598#pullrequestreview-57361088
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170819/3327e37c/attachment.html>
More information about the Github-comments
mailing list