Revision: 1017
http://svn.sourceforge.net/geany/?rev=1017&view=rev
Author: ntrel
Date: 2006-11-22 08:07:18 -0800 (Wed, 22 Nov 2006)
Log Message:
-----------
Ensure tab DnD is enabled when tabs are added; use
notebook_remove_page() instead of gtk_notebook_remove_page().
Unified notebook_[en|dis]able_dnd_for_dropping_files() in
tab_count_changed().
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
trunk/src/notebook.c
trunk/src/notebook.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-11-21 19:20:21 UTC (rev 1016)
+++ trunk/ChangeLog 2006-11-22 16:07:18 UTC (rev 1017)
@@ -1,3 +1,12 @@
+2006-11-22 Nick Treleaven <nick.treleaven(a)btinternet.com>
+
+ * src/notebook.c, src/notebook.h, src/document.c:
+ Ensure tab DnD is enabled when tabs are added; use
+ notebook_remove_page() instead of gtk_notebook_remove_page().
+ Unified notebook_[en|dis]able_dnd_for_dropping_files() in
+ tab_count_changed().
+
+
2006-11-21 Enrico Tröger <enrico.troeger(a)uvena.de>
* src/callbacks.c, src/callbacks.h, src/document.c, src/main.c,
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2006-11-21 19:20:21 UTC (rev 1016)
+++ trunk/src/document.c 2006-11-22 16:07:18 UTC (rev 1017)
@@ -259,14 +259,8 @@
gint tabnum;
gint cur_pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook));
- if (cur_pages == 0)
+ if (cur_pages == 1)
{
- // now we get the first file tab so enable moving of file tabs and
- // disable Dnd for dropping files
- notebook_disable_dnd_for_dropping_files();
- }
- else if (cur_pages == 1)
- {
gint idx = document_get_cur_idx();
// remove the empty document and open a new one
if (doc_list[idx].file_name == NULL && ! doc_list[idx].changed) document_remove(0);
@@ -364,7 +358,7 @@
{
return FALSE;
}
- gtk_notebook_remove_page(GTK_NOTEBOOK(app->notebook), page_num);
+ notebook_remove_page(page_num);
treeviews_openfiles_remove(doc_list[idx].iter);
if (GTK_IS_WIDGET(doc_list[idx].tag_tree))
{
@@ -387,10 +381,6 @@
document_undo_clear(idx);
if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) == 0)
{
- // no more open file tabs so disable moving of file tabs and
- // enable Dnd for dropping files
- notebook_enable_dnd_for_dropping_files();
-
ui_update_tag_list(-1, FALSE);
//on_notebook1_switch_page(GTK_NOTEBOOK(app->notebook), NULL, 0, NULL);
ui_set_window_title(-1);
Modified: trunk/src/notebook.c
===================================================================
--- trunk/src/notebook.c 2006-11-21 19:20:21 UTC (rev 1016)
+++ trunk/src/notebook.c 2006-11-22 16:07:18 UTC (rev 1017)
@@ -271,6 +271,27 @@
}
+// call this whenever the number of tabs in app->notebook changes.
+static void tab_count_changed()
+{
+ if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) == 0)
+ {
+ /* Enables DnD for dropping files into the empty notebook widget */
+ gtk_drag_dest_set(app->notebook, GTK_DEST_DEFAULT_ALL,
+ files_drop_targets, G_N_ELEMENTS(files_drop_targets),
+ GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK);
+ }
+ else
+ {
+ /* Disables DnD for dropping files into the notebook widget and enables the DnD for moving file
+ * tabs. Files can still be dropped into the notebook widget because it will be handled by the
+ * active Scintilla Widget (only dropping to the tab bar is not possible but it should be ok) */
+ gtk_drag_dest_set(app->notebook, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
+ drag_targets, G_N_ELEMENTS(drag_targets), GDK_ACTION_MOVE);
+ }
+}
+
+
/* Returns index of notebook page, or -1 on error */
gint notebook_new_tab(gint doc_idx, gchar *title, GtkWidget *page)
{
@@ -308,6 +329,8 @@
tabnum = gtk_notebook_insert_page_menu(GTK_NOTEBOOK(app->notebook),
GTK_WIDGET(page), hbox, this->tabmenu_label, 0);
+ tab_count_changed();
+
// signal for clicking the tab-close button
g_signal_connect(G_OBJECT(but), "clicked",
G_CALLBACK(notebook_tab_close_clicked_cb), page);
@@ -332,26 +355,14 @@
}
-/* Enables DnD for dropping files into the empty notebook widget */
-void notebook_enable_dnd_for_dropping_files()
+// Always use this instead of gtk_notebook_remove_page().
+void notebook_remove_page(gint page_num)
{
- gtk_drag_dest_set(app->notebook, GTK_DEST_DEFAULT_ALL,
- files_drop_targets, G_N_ELEMENTS(files_drop_targets),
- GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK);
-
+ gtk_notebook_remove_page(GTK_NOTEBOOK(app->notebook), page_num);
+ tab_count_changed();
}
-/* Disables DnD for dropping files into the notebook widget and enables the DnD for moving file
- * tabs. Files can still be dropped into the notebook widget because it will be handled by the
- * active Scintilla Widget (only dropping to the tab bar is not possible but it should be ok) */
-void notebook_disable_dnd_for_dropping_files()
-{
- gtk_drag_dest_set(app->notebook, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
- drag_targets, G_N_ELEMENTS(drag_targets), GDK_ACTION_MOVE);
-}
-
-
static void
on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context,
gint x, gint y, GtkSelectionData *data, guint target_type,
@@ -373,3 +384,4 @@
gtk_drag_finish(drag_context, success, FALSE, time);
}
+
Modified: trunk/src/notebook.h
===================================================================
--- trunk/src/notebook.h 2006-11-21 19:20:21 UTC (rev 1016)
+++ trunk/src/notebook.h 2006-11-22 16:07:18 UTC (rev 1017)
@@ -29,12 +29,7 @@
/* Returns index of notebook page, or -1 on error */
gint notebook_new_tab(gint doc_idx, gchar *title, GtkWidget *page);
-/* Enables DnD for dropping files into the empty notebook widget */
-void notebook_enable_dnd_for_dropping_files();
+// Always use this instead of gtk_notebook_remove_page().
+void notebook_remove_page(gint page_num);
-/* Disables DnD for dropping files into the notebook widget and enables the DnD for moving file
- * tabs. Files can still be dropped into the notebook widget because it will be handled by the
- * active Scintilla Widget (only dropping to the tab bar is not possible but it should be ok) */
-void notebook_disable_dnd_for_dropping_files();
-
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1010
http://svn.sourceforge.net/geany/?rev=1010&view=rev
Author: ntrel
Date: 2006-11-18 07:31:36 -0800 (Sat, 18 Nov 2006)
Log Message:
-----------
Thanks to Rob van der Linde for r988
Modified Paths:
--------------
trunk/THANKS
Modified: trunk/THANKS
===================================================================
--- trunk/THANKS 2006-11-17 17:49:16 UTC (rev 1009)
+++ trunk/THANKS 2006-11-18 15:31:36 UTC (rev 1010)
@@ -19,6 +19,7 @@
Kevin Ellwood <kellwood(at)ameritech(dot)net>
Stefan Oltmanns <stefan(dot)oltmanns(at)abi2006(dot)gymnasium-achim(dot)de> - escape sequences patch
Bob Doan <bdoan(at)sicom(dot)com> - some patches
+Rob van der Linde <robvdl(at)paradise(dot)net(dot)nz> - fixed wrong vte height on some systems
Translators:
----------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1009
http://svn.sourceforge.net/geany/?rev=1009&view=rev
Author: eht16
Date: 2006-11-17 09:49:16 -0800 (Fri, 17 Nov 2006)
Log Message:
-----------
Fixed compile error under Win32. Ignore pressed Stop button under Win32 (at least for the moment, not yet implemented).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
trunk/src/main.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-11-17 12:19:31 UTC (rev 1008)
+++ trunk/ChangeLog 2006-11-17 17:49:16 UTC (rev 1009)
@@ -1,3 +1,11 @@
+2006-11-17 Enrico Tröger <enrico.troeger(a)uvena.de>
+
+ * src/build.c, src/main.c:
+ Fixed compile error under Win32.
+ Ignore pressed Stop button under Win32 (at least for the moment,
+ not yet implemented).
+
+
2006-11-17 Nick Treleaven <nick.treleaven(a)btinternet.com>
* src/search.c:
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2006-11-17 12:19:31 UTC (rev 1008)
+++ trunk/src/build.c 2006-11-17 17:49:16 UTC (rev 1009)
@@ -65,10 +65,11 @@
static void on_make_target_entry_activate(GtkEntry *entry, gpointer user_data);
static void set_stop_button(gboolean stop);
static void build_exit_cb(GPid child_pid, gint status, gpointer user_data);
+static void free_pointers(gpointer first, ...);
+#ifndef G_OS_WIN32
static void kill_process(gint pid);
-static void free_pointers(gpointer first, ...);
+#endif
-
void build_finalize()
{
g_free(build_info.dir);
@@ -886,9 +887,7 @@
GtkWidget *menu, *item, *image, *separator;
GtkAccelGroup *accel_group = gtk_accel_group_new();
GtkTooltips *tooltips = GTK_TOOLTIPS(lookup_widget(app->window, "tooltips"));
-#ifndef G_OS_WIN32
filetype *ft = filetypes[GEANY_FILETYPES_LATEX];
-#endif
menu = gtk_menu_new();
@@ -1202,14 +1201,15 @@
{
gint idx = document_get_cur_idx();
-#ifndef G_OS_WIN32 // on Windows there is no PID returned (resp. it is a handle)
// make the process "stopable"
- if (build_info.pid > 1)
+ if (build_info.pid > (GPid) 1)
{
+ // on Windows there is no PID returned (resp. it is a handle), currently unsupported
+#ifndef G_OS_WIN32
kill_process(build_info.pid);
+#endif
return;
}
-#endif
if (doc_list[idx].file_type->id == GEANY_FILETYPES_LATEX)
{ // run LaTeX file
@@ -1333,6 +1333,7 @@
}
+#ifndef G_OS_WIN32
static void kill_process(gint pid)
{
/* SIGQUIT is not the best signal to use because it causes a core dump (this should not
@@ -1353,6 +1354,7 @@
set_stop_button(FALSE);
}
}
+#endif
// frees all passed pointers if they are non-NULL, the first argument is nothing special,
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2006-11-17 12:19:31 UTC (rev 1008)
+++ trunk/src/main.c 2006-11-17 17:49:16 UTC (rev 1009)
@@ -482,10 +482,10 @@
gtk_set_locale();
signal(SIGTERM, signal_cb);
+#ifdef G_OS_UNIX
// SIGQUIT is used to kill spawned children and we get also this signal, so ignore
signal(SIGQUIT, SIG_IGN);
-#ifdef G_OS_UNIX
- /* ignore SIGPIPE signal for preventing sudden death of program */
+ // ignore SIGPIPE signal for preventing sudden death of program
signal(SIGPIPE, SIG_IGN);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.