Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
Revision: 1229
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1229&view=rev
Author: frlan
Date: 2010-04-10 19:45:17 +0000 (Sat, 10 Apr 2010)
Log Message:
-----------
GeanyLaTeX: Compiler flag G_GNUC_UNUSED no longer needed on glatex_insert_bibtex_entry()
Modified Paths:
--------------
trunk/geanylatex/src/bibtex.c
trunk/geanylatex/src/bibtex.h
Modified: trunk/geanylatex/src/bibtex.c
===================================================================
--- trunk/geanylatex/src/bibtex.c 2010-04-10 17:37:43 UTC (rev 1228)
+++ trunk/geanylatex/src/bibtex.c 2010-04-10 19:45:17 UTC (rev 1229)
@@ -38,7 +38,7 @@
#endif
void glatex_insert_bibtex_entry(G_GNUC_UNUSED GtkMenuItem * menuitem,
- G_GNUC_UNUSED gpointer gdata)
+ gpointer gdata)
{
gint i;
gint doctype = GPOINTER_TO_INT(gdata);
Modified: trunk/geanylatex/src/bibtex.h
===================================================================
--- trunk/geanylatex/src/bibtex.h 2010-04-10 17:37:43 UTC (rev 1228)
+++ trunk/geanylatex/src/bibtex.h 2010-04-10 19:45:17 UTC (rev 1229)
@@ -84,8 +84,7 @@
int glatex_push_bibtex_entry(int style, GeanyDocument *doc);
-void glatex_insert_bibtex_entry(G_GNUC_UNUSED GtkMenuItem * menuitem,
- G_GNUC_UNUSED gpointer gdata);
+void glatex_insert_bibtex_entry(G_GNUC_UNUSED GtkMenuItem * menuitem, gpointer gdata);
void glatex_bibtex_write_entry(GPtrArray *entry, gint doctype);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1228
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1228&view=rev
Author: dimitrov-adrian
Date: 2010-04-10 17:37:43 +0000 (Sat, 10 Apr 2010)
Log Message:
-----------
Treebrowser: make right click menu dynamic
Modified Paths:
--------------
trunk/geany-plugins/treebrowser/ChangeLog
trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/ChangeLog
===================================================================
--- trunk/geany-plugins/treebrowser/ChangeLog 2010-04-10 16:59:27 UTC (rev 1227)
+++ trunk/geany-plugins/treebrowser/ChangeLog 2010-04-10 17:37:43 UTC (rev 1228)
@@ -27,6 +27,7 @@
some string changed in prefs dialog
added option to close document if it is deleted from treebrowser
highlighing addressbar if typed directory not exists
+ make right click menu dynamic
31-03-2010 Adrian Dimitrov <dimitrov.adrian(a)gmail.com>
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c
===================================================================
--- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-10 16:59:27 UTC (rev 1227)
+++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-10 17:37:43 UTC (rev 1228)
@@ -389,6 +389,13 @@
* ------------------*/
static void
+on_menu_close(GtkMenuItem *menuitem, gchar *uri)
+{
+ if (g_file_test(uri, G_FILE_TEST_EXISTS))
+ document_close(document_find_by_filename(uri));
+}
+
+static void
on_menu_go_up(GtkMenuItem *menuitem, gpointer *user_data)
{
treebrowser_chroot(g_path_get_dirname(addressbar_last_address));
@@ -401,60 +408,39 @@
}
static void
-on_menu_open_externally(GtkMenuItem *menuitem, gpointer *user_data)
+on_menu_open_externally(GtkMenuItem *menuitem, gchar *uri)
{
-
- GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
- GtkTreeIter iter;
- GtkTreeModel *model;
- gchar *uri;
-
gchar *cmd, *locale_cmd, *dir;
GString *cmd_str = g_string_new(CONFIG_OPEN_EXTERNAL_CMD);
GError *error = NULL;
- if (gtk_tree_selection_get_selected(selection, &model, &iter))
- {
- gtk_tree_model_get(model, &iter, TREEBROWSER_COLUMN_URI, &uri, -1);
+ dir = g_file_test(uri, G_FILE_TEST_IS_DIR) ? g_strdup(uri) : g_path_get_dirname(uri);
- dir = g_file_test(uri, G_FILE_TEST_IS_DIR) ? g_strdup(uri) : g_path_get_dirname(uri);
+ utils_string_replace_all(cmd_str, "%f", uri);
+ utils_string_replace_all(cmd_str, "%d", dir);
- utils_string_replace_all(cmd_str, "%f", uri);
- utils_string_replace_all(cmd_str, "%d", dir);
-
- cmd = g_string_free(cmd_str, FALSE);
- locale_cmd = utils_get_locale_from_utf8(cmd);
- if (! g_spawn_command_line_async(locale_cmd, &error))
- {
- gchar *c = strchr(cmd, ' ');
- if (c != NULL)
- *c = '\0';
- ui_set_statusbar(TRUE,
- _("Could not execute configured external command '%s' (%s)."),
- cmd, error->message);
- g_error_free(error);
- }
- g_free(locale_cmd);
- g_free(cmd);
- g_free(dir);
+ cmd = g_string_free(cmd_str, FALSE);
+ locale_cmd = utils_get_locale_from_utf8(cmd);
+ if (! g_spawn_command_line_async(locale_cmd, &error))
+ {
+ gchar *c = strchr(cmd, ' ');
+ if (c != NULL)
+ *c = '\0';
+ ui_set_statusbar(TRUE,
+ _("Could not execute configured external command '%s' (%s)."),
+ cmd, error->message);
+ g_error_free(error);
}
+ g_free(locale_cmd);
+ g_free(cmd);
+ g_free(dir);
}
static void
-on_menu_set_as_root(GtkMenuItem *menuitem, const gchar *type)
+on_menu_set_as_root(GtkMenuItem *menuitem, gchar *uri)
{
-
- GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
- GtkTreeIter iter;
- GtkTreeModel *model;
- gchar *uri;
-
- if (gtk_tree_selection_get_selected(selection, &model, &iter))
- {
- gtk_tree_model_get(model, &iter, TREEBROWSER_COLUMN_URI, &uri, -1);
- if (g_file_test(uri, G_FILE_TEST_IS_DIR))
- treebrowser_chroot(uri);
- }
+ if (g_file_test(uri, G_FILE_TEST_IS_DIR))
+ treebrowser_chroot(uri);
}
static void
@@ -610,12 +596,24 @@
}
static GtkWidget*
-create_popup_menu(gpointer *user_data)
+create_popup_menu(gchar *name, gchar *uri)
{
+ gboolean is_exists = g_file_test(uri, G_FILE_TEST_EXISTS);
+ gboolean is_dir = is_exists ? g_file_test(uri, G_FILE_TEST_IS_DIR) : FALSE;
GtkWidget *item, *menu;
menu = gtk_menu_new();
+ if (document_find_by_filename(uri) != NULL)
+ {
+ item = ui_image_menu_item_new(GTK_STOCK_CLOSE, g_strdup_printf(_("Close: %s"), name));
+ gtk_container_add(GTK_CONTAINER(menu), item);
+ g_signal_connect(item, "activate", G_CALLBACK(on_menu_close), uri);
+
+ item = gtk_separator_menu_item_new();
+ gtk_container_add(GTK_CONTAINER(menu), item);
+ }
+
item = ui_image_menu_item_new(GTK_STOCK_GO_UP, _("Go up"));
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect(item, "activate", G_CALLBACK(on_menu_go_up), NULL);
@@ -624,16 +622,21 @@
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect(item, "activate", G_CALLBACK(on_menu_current_path), NULL);
- item = ui_image_menu_item_new(GTK_STOCK_OPEN, _("Open externally"));
- gtk_container_add(GTK_CONTAINER(menu), item);
- g_signal_connect(item, "activate", G_CALLBACK(on_menu_open_externally), NULL);
+ if (is_exists)
+ {
+ item = ui_image_menu_item_new(GTK_STOCK_OPEN, _("Open externally"));
+ gtk_container_add(GTK_CONTAINER(menu), item);
+ g_signal_connect(item, "activate", G_CALLBACK(on_menu_open_externally), uri);
+ }
- item = ui_image_menu_item_new(GTK_STOCK_OPEN, _("Set as root"));
- gtk_container_add(GTK_CONTAINER(menu), item);
- g_signal_connect(item, "activate", G_CALLBACK(on_menu_set_as_root), NULL);
+ if (is_dir)
+ {
+ item = ui_image_menu_item_new(GTK_STOCK_OPEN, _("Set as root"));
+ gtk_container_add(GTK_CONTAINER(menu), item);
+ g_signal_connect(item, "activate", G_CALLBACK(on_menu_set_as_root), uri);
+ }
item = gtk_separator_menu_item_new();
- gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
item = ui_image_menu_item_new(GTK_STOCK_ADD, _("Create new directory"));
@@ -644,16 +647,18 @@
gtk_container_add(GTK_CONTAINER(menu), item);
g_signal_connect(item, "activate", G_CALLBACK(on_menu_create_new_object), "file");
- item = ui_image_menu_item_new(GTK_STOCK_SAVE_AS, _("Rename"));
- gtk_container_add(GTK_CONTAINER(menu), item);
- g_signal_connect(item, "activate", G_CALLBACK(on_menu_rename), NULL);
+ if (is_exists)
+ {
+ item = ui_image_menu_item_new(GTK_STOCK_SAVE_AS, _("Rename"));
+ gtk_container_add(GTK_CONTAINER(menu), item);
+ g_signal_connect(item, "activate", G_CALLBACK(on_menu_rename), NULL);
- item = ui_image_menu_item_new(GTK_STOCK_DELETE, _("Delete"));
- gtk_container_add(GTK_CONTAINER(menu), item);
- g_signal_connect(item, "activate", G_CALLBACK(on_menu_delete), NULL);
+ item = ui_image_menu_item_new(GTK_STOCK_DELETE, _("Delete"));
+ gtk_container_add(GTK_CONTAINER(menu), item);
+ g_signal_connect(item, "activate", G_CALLBACK(on_menu_delete), NULL);
+ }
item = gtk_separator_menu_item_new();
- gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
item = ui_image_menu_item_new(GTK_STOCK_REFRESH, _("Refresh"));
@@ -673,7 +678,6 @@
g_signal_connect(item, "activate", G_CALLBACK(on_menu_collapse_all), NULL);
item = gtk_separator_menu_item_new();
- gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
menu_showbars = gtk_check_menu_item_new_with_mnemonic(_("Show bars"));
@@ -754,14 +758,23 @@
* ------------------ */
static gboolean
-on_treeview_mouseclick(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
+on_treeview_mouseclick(GtkWidget *widget, GdkEventButton *event, GtkTreeSelection *selection)
{
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ gchar *name = NULL, *uri = NULL;
+
+ if (gtk_tree_selection_get_selected(selection, &model, &iter))
+ {
+ gtk_tree_model_get(GTK_TREE_MODEL(treestore), &iter,
+ TREEBROWSER_COLUMN_NAME, &name,
+ TREEBROWSER_COLUMN_URI, &uri,
+ -1);
+ }
+
if (event->button == 3)
{
- static GtkWidget *popup_menu = NULL;
- if (popup_menu == NULL)
- popup_menu = create_popup_menu(user_data);
- gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, event->button, event->time);
+ gtk_menu_popup(GTK_MENU(create_popup_menu(name, uri)), NULL, NULL, NULL, NULL, event->button, event->time);
return TRUE;
}
return FALSE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1227
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1227&view=rev
Author: dimitrov-adrian
Date: 2010-04-10 16:59:27 +0000 (Sat, 10 Apr 2010)
Log Message:
-----------
Treebrowser, highlighing addressbar if typed directory not exists
Modified Paths:
--------------
trunk/geany-plugins/treebrowser/ChangeLog
trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/ChangeLog
===================================================================
--- trunk/geany-plugins/treebrowser/ChangeLog 2010-04-10 16:41:30 UTC (rev 1226)
+++ trunk/geany-plugins/treebrowser/ChangeLog 2010-04-10 16:59:27 UTC (rev 1227)
@@ -26,6 +26,7 @@
fixed wrong root refresh on delete and create when objects are in toplevel
some string changed in prefs dialog
added option to close document if it is deleted from treebrowser
+ highlighing addressbar if typed directory not exists
31-03-2010 Adrian Dimitrov <dimitrov.adrian(a)gmail.com>
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c
===================================================================
--- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-10 16:41:30 UTC (rev 1226)
+++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-10 16:59:27 UTC (rev 1227)
@@ -725,6 +725,20 @@
on_addressbar_activate(GtkEntry *entry, gpointer user_data)
{
gchar *directory = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
+
+ static const GdkColor red = {0, 0xffff, 0x6666, 0x6666};
+ static const GdkColor white = {0, 0xffff, 0xffff, 0xffff};
+ static gboolean old_value = TRUE;
+ gboolean success = g_file_test(directory, G_FILE_TEST_IS_DIR);
+
+ g_return_if_fail(GTK_WIDGET(entry) != NULL);
+ if (old_value != success)
+ {
+ gtk_widget_modify_base(GTK_WIDGET(entry), GTK_STATE_NORMAL, success ? NULL : &red);
+ gtk_widget_modify_text(GTK_WIDGET(entry), GTK_STATE_NORMAL, success ? NULL : &white);
+ old_value = success;
+ }
+
treebrowser_chroot(directory);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1226
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1226&view=rev
Author: dimitrov-adrian
Date: 2010-04-10 16:41:30 +0000 (Sat, 10 Apr 2010)
Log Message:
-----------
Treebrowser, added option to close document if it is deleted from treebrowser
Modified Paths:
--------------
trunk/geany-plugins/treebrowser/ChangeLog
trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/ChangeLog
===================================================================
--- trunk/geany-plugins/treebrowser/ChangeLog 2010-04-10 16:28:08 UTC (rev 1225)
+++ trunk/geany-plugins/treebrowser/ChangeLog 2010-04-10 16:41:30 UTC (rev 1226)
@@ -25,6 +25,7 @@
* src/treebrowser.c
fixed wrong root refresh on delete and create when objects are in toplevel
some string changed in prefs dialog
+ added option to close document if it is deleted from treebrowser
31-03-2010 Adrian Dimitrov <dimitrov.adrian(a)gmail.com>
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c
===================================================================
--- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-10 16:28:08 UTC (rev 1225)
+++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-10 16:41:30 UTC (rev 1226)
@@ -49,6 +49,7 @@
static gboolean CONFIG_CHROOT_ON_DCLICK = FALSE;
static gboolean CONFIG_FOLLOW_CURRENT_DOC = TRUE;
static gboolean CONFIG_ON_EXPAND_REFRESH = FALSE;
+static gboolean CONFIG_ON_DELETE_CLOSE_FILE = TRUE;
/* ------------------
@@ -555,6 +556,9 @@
if (dialogs_show_question(_("Do you really want to delete '%s' ?"), uri))
{
+ if (CONFIG_ON_DELETE_CLOSE_FILE && ! g_file_test(uri, G_FILE_TEST_IS_DIR))
+ document_close(document_find_by_filename(uri));
+
fs_remove(uri, TRUE);
path_parent = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter);
@@ -950,7 +954,6 @@
ui_widget_set_tooltip_text(addressbar,
_("Addressbar (/projects/my-project"));
-
gtk_box_pack_start(GTK_BOX(sidebar_vbox), scrollwin, TRUE, TRUE, 1);
gtk_box_pack_start(GTK_BOX(sidebar_vbox), sidebar_vbox_bars, FALSE, TRUE, 1);
@@ -1014,6 +1017,7 @@
GtkWidget *CHROOT_ON_DCLICK;
GtkWidget *FOLLOW_CURRENT_DOC;
GtkWidget *ON_EXPAND_REFRESH;
+ GtkWidget *ON_DELETE_CLOSE_FILE;
} configure_widgets;
@@ -1033,6 +1037,7 @@
CONFIG_CHROOT_ON_DCLICK = utils_get_setting_boolean(config, "treebrowser", "chroot_on_dclick", CONFIG_CHROOT_ON_DCLICK);
CONFIG_FOLLOW_CURRENT_DOC = utils_get_setting_boolean(config, "treebrowser", "follow_current_doc", CONFIG_FOLLOW_CURRENT_DOC);
CONFIG_ON_EXPAND_REFRESH = utils_get_setting_boolean(config, "treebrowser", "on_expand_refresh", CONFIG_ON_EXPAND_REFRESH);
+ CONFIG_ON_DELETE_CLOSE_FILE = utils_get_setting_boolean(config, "treebrowser", "on_delete_close_file", CONFIG_ON_DELETE_CLOSE_FILE);
g_key_file_free(config);
}
@@ -1057,6 +1062,7 @@
g_key_file_set_boolean(config, "treebrowser", "chroot_on_dclick", CONFIG_CHROOT_ON_DCLICK);
g_key_file_set_boolean(config, "treebrowser", "follow_current_doc", CONFIG_FOLLOW_CURRENT_DOC);
g_key_file_set_boolean(config, "treebrowser", "on_expand_refresh", CONFIG_ON_EXPAND_REFRESH);
+ g_key_file_set_boolean(config, "treebrowser", "on_delete_close_file", CONFIG_ON_DELETE_CLOSE_FILE);
data = g_key_file_to_data(config, NULL, NULL);
utils_write_file(CONFIG_FILE, data);
@@ -1080,6 +1086,7 @@
CONFIG_CHROOT_ON_DCLICK = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.CHROOT_ON_DCLICK));
CONFIG_FOLLOW_CURRENT_DOC = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.FOLLOW_CURRENT_DOC));
CONFIG_ON_EXPAND_REFRESH = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.ON_EXPAND_REFRESH));
+ CONFIG_ON_DELETE_CLOSE_FILE = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configure_widgets.ON_DELETE_CLOSE_FILE));
if (save_settings() == TRUE)
treebrowser_chroot(addressbar_last_address);
@@ -1152,6 +1159,11 @@
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.ON_EXPAND_REFRESH), CONFIG_ON_EXPAND_REFRESH);
gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.ON_EXPAND_REFRESH, FALSE, FALSE, 0);
+ configure_widgets.ON_DELETE_CLOSE_FILE = gtk_check_button_new_with_label(_("On delete file, close if it is opened"));
+ gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.ON_DELETE_CLOSE_FILE), FALSE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.ON_DELETE_CLOSE_FILE), CONFIG_ON_DELETE_CLOSE_FILE);
+ gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.ON_DELETE_CLOSE_FILE, FALSE, FALSE, 0);
+
gtk_widget_show_all(vbox);
g_signal_connect(dialog, "response", G_CALLBACK(on_configure_response), NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1225
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1225&view=rev
Author: dimitrov-adrian
Date: 2010-04-10 16:28:08 +0000 (Sat, 10 Apr 2010)
Log Message:
-----------
Treebrowser: fixed wrong root refresh on delete or create when objects are in toplevel.
Modified Paths:
--------------
trunk/geany-plugins/treebrowser/ChangeLog
trunk/geany-plugins/treebrowser/src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/ChangeLog
===================================================================
--- trunk/geany-plugins/treebrowser/ChangeLog 2010-04-07 15:55:09 UTC (rev 1224)
+++ trunk/geany-plugins/treebrowser/ChangeLog 2010-04-10 16:28:08 UTC (rev 1225)
@@ -5,7 +5,8 @@
(DONE) codestyle improve to be same as other parts as geany`s
(DONE) configuration dialog
- * trackick path to current focused document (currently now roking on Windows)
+ (DONE) tracking path to current focused document (currently now roking on Windows)
+ * Better tracking for files, open path to them
* In windows can choice between devices (C:\, D:\,...)
* Windows compitable
* Language files
@@ -19,6 +20,13 @@
| Development release ChangeLog |
+-------------------------------+
+10-04-2010 Adrian Dimitrov <dimitrov.adrian(a)gmail.com>
+
+ * src/treebrowser.c
+ fixed wrong root refresh on delete and create when objects are in toplevel
+ some string changed in prefs dialog
+
+
31-03-2010 Adrian Dimitrov <dimitrov.adrian(a)gmail.com>
* src/treebrowser.c
Modified: trunk/geany-plugins/treebrowser/src/treebrowser.c
===================================================================
--- trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-07 15:55:09 UTC (rev 1224)
+++ trunk/geany-plugins/treebrowser/src/treebrowser.c 2010-04-10 16:28:08 UTC (rev 1225)
@@ -473,17 +473,16 @@
{
uri = g_path_get_dirname(uri);
path_parent = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter);
- if (gtk_tree_path_up(path_parent))
- gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path_parent);
+ if (gtk_tree_path_up(path_parent) &&
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path_parent));
+ else
+ refresh_root = TRUE;
}
}
else
{
refresh_root = TRUE;
uri = addressbar_last_address;
- path_parent = gtk_tree_path_new_from_string("0");
- gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path_parent);
-
}
if (utils_str_equal(type, "directory"))
@@ -559,10 +558,11 @@
fs_remove(uri, TRUE);
path_parent = gtk_tree_model_get_path(GTK_TREE_MODEL(treestore), &iter);
- if (gtk_tree_path_up(path_parent))
- gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path_parent);
-
- treebrowser_browse(g_path_get_dirname(uri), &iter, CONFIG_INITIAL_DIR_DEEP);
+ if (gtk_tree_path_up(path_parent) &&
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), &iter, path_parent))
+ treebrowser_browse(g_path_get_dirname(uri), &iter, CONFIG_INITIAL_DIR_DEEP);
+ else
+ treebrowser_browse(g_path_get_dirname(uri), NULL, CONFIG_INITIAL_DIR_DEEP);
}
}
}
@@ -765,7 +765,10 @@
{
if (g_file_test(uri, G_FILE_TEST_IS_DIR))
{
+ /*
+ Not sure that this is job for clicks
treebrowser_browse(uri, &iter, CONFIG_INITIAL_DIR_DEEP);
+ */
}
else
if (CONFIG_ONE_CLICK_CHDOC)
@@ -942,6 +945,12 @@
gtk_box_pack_start(GTK_BOX(sidebar_vbox_bars), addressbar, FALSE, TRUE, 1);
gtk_box_pack_start(GTK_BOX(sidebar_vbox_bars), toolbar, FALSE, TRUE, 1);
+ ui_widget_set_tooltip_text(filter,
+ _("Filter (*.c;*.h;*.cpp)"));
+ ui_widget_set_tooltip_text(addressbar,
+ _("Addressbar (/projects/my-project"));
+
+
gtk_box_pack_start(GTK_BOX(sidebar_vbox), scrollwin, TRUE, TRUE, 1);
gtk_box_pack_start(GTK_BOX(sidebar_vbox), sidebar_vbox_bars, FALSE, TRUE, 1);
@@ -1049,7 +1058,6 @@
g_key_file_set_boolean(config, "treebrowser", "follow_current_doc", CONFIG_FOLLOW_CURRENT_DOC);
g_key_file_set_boolean(config, "treebrowser", "on_expand_refresh", CONFIG_ON_EXPAND_REFRESH);
- /* write config to file */
data = g_key_file_to_data(config, NULL, NULL);
utils_write_file(CONFIG_FILE, data);
g_free(data);
@@ -1089,7 +1097,7 @@
vbox = gtk_vbox_new(FALSE, 0);
hbox = gtk_hbox_new(FALSE, 0);
- label = gtk_label_new(_("External open command: "));
+ label = gtk_label_new(_("External open command "));
configure_widgets.OPEN_EXTERNAL_CMD = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(configure_widgets.OPEN_EXTERNAL_CMD), CONFIG_OPEN_EXTERNAL_CMD);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
@@ -1102,10 +1110,12 @@
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 6);
hbox = gtk_hbox_new(FALSE, 0);
- label = gtk_label_new(_("Default directory deep to fill: "));
+ label = gtk_label_new(_("Default directory deep to fill "));
configure_widgets.INITIAL_DIR_DEEP = gtk_spin_button_new_with_range(1, 99, 1);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(configure_widgets.INITIAL_DIR_DEEP), CONFIG_INITIAL_DIR_DEEP);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+ ui_widget_set_tooltip_text(configure_widgets.INITIAL_DIR_DEEP,
+ _("How many folders will opened and store in tree."));
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), configure_widgets.INITIAL_DIR_DEEP, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 6);
@@ -1114,6 +1124,8 @@
gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.SHOW_HIDDEN_FILES), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.SHOW_HIDDEN_FILES), CONFIG_SHOW_HIDDEN_FILES);
gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.SHOW_HIDDEN_FILES, FALSE, FALSE, 0);
+ ui_widget_set_tooltip_text(configure_widgets.INITIAL_DIR_DEEP,
+ _("On Windows, this just hide files that are prefixed with '.' (dot)."));
configure_widgets.REVERSE_FILTER = gtk_check_button_new_with_label(_("Reverse filter"));
gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.REVERSE_FILTER), FALSE);
@@ -1125,12 +1137,12 @@
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.FOLLOW_CURRENT_DOC), CONFIG_FOLLOW_CURRENT_DOC);
gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.FOLLOW_CURRENT_DOC, FALSE, FALSE, 0);
- configure_widgets.ONE_CLICK_CHDOC = gtk_check_button_new_with_label(_("On click document change"));
+ configure_widgets.ONE_CLICK_CHDOC = gtk_check_button_new_with_label(_("Single click, open document and focus it"));
gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.ONE_CLICK_CHDOC), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.ONE_CLICK_CHDOC), CONFIG_ONE_CLICK_CHDOC);
gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.ONE_CLICK_CHDOC, FALSE, FALSE, 0);
- configure_widgets.CHROOT_ON_DCLICK = gtk_check_button_new_with_label(_("Chroot on dclick"));
+ configure_widgets.CHROOT_ON_DCLICK = gtk_check_button_new_with_label(_("Double click open directory"));
gtk_button_set_focus_on_click(GTK_BUTTON(configure_widgets.CHROOT_ON_DCLICK), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configure_widgets.CHROOT_ON_DCLICK), CONFIG_CHROOT_ON_DCLICK);
gtk_box_pack_start(GTK_BOX(vbox), configure_widgets.CHROOT_ON_DCLICK, FALSE, FALSE, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1224
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1224&view=rev
Author: ctabin
Date: 2010-04-07 15:55:09 +0000 (Wed, 07 Apr 2010)
Log Message:
-----------
patch to ensure that no action is done when no document is open (segfault may occur)
Modified Paths:
--------------
trunk/geany-plugins/pretty-printer/src/PluginEntry.c
Modified: trunk/geany-plugins/pretty-printer/src/PluginEntry.c
===================================================================
--- trunk/geany-plugins/pretty-printer/src/PluginEntry.c 2010-04-02 08:50:43 UTC (rev 1223)
+++ trunk/geany-plugins/pretty-printer/src/PluginEntry.c 2010-04-07 15:55:09 UTC (rev 1224)
@@ -52,6 +52,8 @@
//put the menu into the Tools
main_menu_item = gtk_menu_item_new_with_mnemonic("PrettyPrint XML");
+ ui_add_document_sensitive(main_menu_item);
+
gtk_widget_show(main_menu_item);
gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), main_menu_item);
@@ -66,7 +68,7 @@
}
//TODO uncomment when configuration widget ready
-/*GtkWidget* plugin_configure(GtkDialog * dialog)
+/*GtkWidget* plugin_configure(GtkDialog * dialog)
{
//creates the configuration widget
GtkWidget* widget = createPrettyPrinterConfigUI(dialog);
@@ -87,25 +89,28 @@
void xml_format(GtkMenuItem* menuitem, gpointer gdata)
{
- //default printing options
- if (prettyPrintingOptions == NULL) { prettyPrintingOptions = createDefaultPrettyPrintingOptions(); }
-
//retrieves the current document
GeanyDocument* doc = document_get_current();
GeanyEditor* editor = doc->editor;
ScintillaObject* sco = editor->sci;
- //allocate a new pointer
+ g_return_if_fail(doc != NULL);
+
+ //default printing options
+ if (prettyPrintingOptions == NULL) { prettyPrintingOptions = createDefaultPrettyPrintingOptions(); }
+
+ //prepare the buffer that will contain the text
+ //from the scintilla object
int length = sci_get_length(sco)+1;
char* buffer = (char*)malloc(length*sizeof(char));
if (buffer == NULL) { exit(-1); } //malloc error
-
+
//retrieves the text
sci_get_text(sco, length, buffer);
-
+
//checks if the data is an XML format
xmlDoc* xmlDoc = xmlParseDoc((unsigned char*)buffer);
-
+
if(xmlDoc == NULL) //this is not a valid xml
{
dialogs_show_msgbox(GTK_MESSAGE_ERROR, "Unable to parse the content as XML.");
@@ -114,7 +119,7 @@
//process pretty-printing
int result = processXMLPrettyPrinting(&buffer, &length, prettyPrintingOptions);
- if (result != 0)
+ if (result != 0)
{
dialogs_show_msgbox(GTK_MESSAGE_ERROR, "Unable to process PrettyPrinting on the specified XML because some features are not supported.\n\nSee Help > Debug messages for more details...");
return;
@@ -122,15 +127,15 @@
//updates the document
sci_set_text(sco, buffer);
-
+
//set the line
int xOffset = scintilla_send_message(sco, SCI_GETXOFFSET, NULL, NULL);
scintilla_send_message(sco, SCI_LINESCROLL, -xOffset, 0); //TODO update with the right function-call for geany-0.19
-
+
//sets the type
- GeanyFiletype* fileType = filetypes_index(GEANY_FILETYPES_XML);
+ GeanyFiletype* fileType = filetypes_index(GEANY_FILETYPES_XML);
document_set_filetype(doc, fileType);
-
+
//free all
xmlFreeDoc(xmlDoc);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1223
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1223&view=rev
Author: frlan
Date: 2010-04-02 08:50:43 +0000 (Fri, 02 Apr 2010)
Log Message:
-----------
GeanyLaTeX: Font chooser already available. Adding one more point to TODO
Modified Paths:
--------------
trunk/geanylatex/TODO
Modified: trunk/geanylatex/TODO
===================================================================
--- trunk/geanylatex/TODO 2010-04-02 08:50:21 UTC (rev 1222)
+++ trunk/geanylatex/TODO 2010-04-02 08:50:43 UTC (rev 1223)
@@ -21,6 +21,7 @@
* Adding support for diff. letter classes
* Adding a way setting variables/values for wizard inside custom
template
+ * Cleaning up the mess with KOMA/non KOMA classes
* Replacing of environments
* Parsing document for »TOC«
* Navigation throught document
@@ -28,4 +29,4 @@
* Make special characters extensible through files
* Improve behaviour of levelup and leveldown of structures
* Autoinserting {} when typing \command+return
-* Adding a font size chooser to toolbar and menue
+* Adding a font size chooser to toolbar
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1222
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1222&view=rev
Author: frlan
Date: 2010-04-02 08:50:21 +0000 (Fri, 02 Apr 2010)
Log Message:
-----------
GeanyLaTeX: Added a screenshot for inserting \usepackage{} dialog
Modified Paths:
--------------
trunk/geanylatex/doc/geanylatex.tex
Added Paths:
-----------
trunk/geanylatex/doc/img/insert_usepackage.png
Modified: trunk/geanylatex/doc/geanylatex.tex
===================================================================
--- trunk/geanylatex/doc/geanylatex.tex 2010-03-31 15:43:19 UTC (rev 1221)
+++ trunk/geanylatex/doc/geanylatex.tex 2010-04-02 08:50:21 UTC (rev 1222)
@@ -525,6 +525,12 @@
top of the \texttt{\textbackslash{}begin\{document\}} statement if
there is any.
+\begin{figure}[ht]
+ \centering
+ \includegraphics[width=0.4\textwidth]{img/insert_usepackage.png}
+ \caption{Dialog for inserting \textbackslash{}usepackage\{\}}
+\end{figure}
+
\section{Configuration}
GeanyLaTeX{} can be configured in two major ways:
Added: trunk/geanylatex/doc/img/insert_usepackage.png
===================================================================
--- trunk/geanylatex/doc/img/insert_usepackage.png (rev 0)
+++ trunk/geanylatex/doc/img/insert_usepackage.png 2010-04-02 08:50:21 UTC (rev 1222)
@@ -0,0 +1,114 @@
+\x89PNG
+
+
+IHDR = \x97 gk\x8C\xA1 sBIT|d\x88 IDATx\x9C\xED\xDDy\T\xF5\xFA\xC0\xF1\xCF,0\xEC;\x82K.iYn@j\xB9\x95\xE2\x96▹\xA2h\xD9\xFD\xDD\25\xDB\xEB\xB6X\x9A\xB6i\xA6\xB9\xA4\xA9hf\xAE\xE5\x82\xE9-\x93A\x85\xAB\x85j$ð̜s~ \x93#\x8B\x83\xA2\x98\xF3}\xBF^\xF3\xD2s\xE6;\xCF\xF3\x9Cq\xCE\xE3\xD9\xE6\x8CJQ\x85\xEBt\xE8\xE2!\xBA\xF9t\xBBޗ\x82 \xDCr\xAA\x8A\xA6\xB7y\xF3\xE6\xFA\xAEE\xE1\xA61b\x84\xF9\xEF\xAAm۶)\x9E\x9E\x9Et\xEEԹKA\xB8y~=\xFC+yyy2U\\\x9C\xD2\xE6\xDE6\xF5]\x93 \xC2M\xF5{\xE2蠟\xA7\xA3\xD2\xEA\xAF\xFB\x98\x9E \xC2?\xC9Ͽ\xFC\x8C\xAA \xBF@4=Al\x86V\x96e\xAB^ʿDzZ:\x8A\xA2\x84\xA7\xA7\xE7
+%\xAE\xEBx\x82 ԝ\xDB}}\xBF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