Commit 16f86759 authored by Andreas Rönnquist's avatar Andreas Rönnquist

Update upstream source from tag 'upstream/1.11'

Update to upstream version '1.11'
with Debian dir 1d07027e1b07774f24d77e729361c2825120eecf
parents 7e0d4e7e 9eefb769
......@@ -2,6 +2,10 @@
ChangeLog:
----------
1.11
* Remove checks for GTK version, we require GTK 3 from now on
* Update required LUA version to 5.3
1.10
* Fix webpage link in about dialog
......
#
# Copyright (C) 2010-2017 Andreas Rönnquist
# Copyright (C) 2010-2018 Andreas Rönnquist
# This file is distributed under the same license
# as the sciteproj package, see COPYING file.
#
......@@ -13,24 +13,13 @@ to build are:
pkg-config
libgtk-3-dev
liblua5.1-0-dev
gettext
or if you are still using GTK version 2:
pkg-config
libgtk2.0-dev
liblua5.1-0-dev
liblua5.3-dev
gettext
Then the build process is simple - to build the program, just type
make
or on GTK2, you need to pass
make GTK2=1
which will in the end create an executable in the bin folder. If you want to
build an executable with debug symbols enable, run
......
#
# Copyright (C) 2009-2017 Andreas Rönnquist
# Copyright (C) 2009-2018 Andreas Rönnquist
# This file is distributed under the same license
# as the sciteproj package, see COPYING file.
#
......@@ -46,32 +46,22 @@ DATADIR= ${DESTDIR}${PREFIX}/share
LOCALEDIR = ${DATADIR}/locale
VERSION=$(shell cat ./VERSION)
ifdef GTK2
PKG_GTK=gtk+-2.0
CHECK_GTK3=1
else
PKG_GTK=gtk+-3.0
endif
PKG_GTK=gtk+-3.0
CHECK_GTK3=1
LIB_CFLAGS=$(shell pkg-config --cflags --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || pkg-config --cflags $(PKG_GTK) $(PKG_WNCK) lua)
LIB_CFLAGS=$(shell pkg-config --cflags --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.3 || pkg-config --cflags $(PKG_GTK) $(PKG_WNCK) lua)
STD_LDFLAGS=
LIBS=-lX11 $(shell pkg-config --libs --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || pkg-config --libs $(PKG_GTK) $(PKG_WNCK) lua)
LIBS=-lX11 $(shell pkg-config --libs --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.3 || pkg-config --libs $(PKG_GTK) $(PKG_WNCK) lua)
LOCAL_CFLAGS=$(STD_CFLAGS) $(DEPRECATED) $(CFLAGS) $(LIB_CFLAGS)
LOCAL_LDFLAGS=$(STD_CFLAGS) $(LDFLAGS) $(STD_LDFLAGS)
LOCAL_CPPFLAGS=$(CPPFLAGS)
ifdef CHECK_GTK3
LOCAL_CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
LOCAL_CFLAGS+=-DGSEAL_ENABLE
LOCAL_CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
LOCAL_CFLAGS+=-DGSEAL_ENABLE
CHECK_DEPRECATED=1
endif
ifdef CHECK_DEPRECATED
LOCAL_CFLAGS+=-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
endif
LOCAL_CFLAGS+=-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
LOCAL_CFLAGS+=-DLOCALEDIR=\"$(LOCALEDIR)\" -DPACKAGE=\"$(NAME)\" -DSCITEPROJ_VERSION=\"$(VERSION)\"
......
#
# Copyright (C) 2010-2017 Andreas Rönnquist
# Copyright (C) 2010-2018 Andreas Rönnquist
# This file is distributed under the same license
# as the sciteproj package, see COPYING file.
#
......
#
# Copyright (C) 2010-2017 Andreas Rönnquist
# Copyright (C) 2010-2018 Andreas Rönnquist
# This file is distributed under the same license
# as the sciteproj package, see COPYING file.
#
......
1.10
\ No newline at end of file
1.11
\ No newline at end of file
.\"
.\" Copyright (C) 2010-2017 Andreas Rönnquist
.\" Copyright (C) 2010-2018 Andreas Rönnquist
.\" This file is distributed under the same license
.\" as the sciteproj package, see COPYING file.
.\"
......
/**
* about.c - about dialog for SciteProj
*
* Copyright 2008-2017 Andreas Rönnquist
* Copyright 2008-2018 Andreas Rönnquist
*
* This file is part of SciteProj.
*
......@@ -63,11 +63,7 @@ void show_about_dialog()
*/
void create_about_dialog()
{
#if GTK_MAJOR_VERSION >= 3
GtkWidget *grid;
#else
GtkWidget *vbox;
#endif
GtkWidget *textview_info;
GtkWidget *logo_image;
GtkWidget *linkbutton;
......@@ -96,42 +92,28 @@ void create_about_dialog()
gtk_widget_set_size_request(window, 500, 400);
// Make a container
#if GTK_MAJOR_VERSION >= 3
grid = gtk_grid_new();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_container_add(GTK_CONTAINER(window), grid);
#else
vbox = gtk_vbox_new(FALSE,5);
gtk_container_add(GTK_CONTAINER(window), vbox);
#endif
logo_image = gtk_image_new_from_pixbuf(program_icon_pixbuf);
#if GTK_MAJOR_VERSION >= 3
gtk_grid_attach(GTK_GRID(grid), logo_image, 0, 0, 5, 1);
#else
gtk_box_pack_start(GTK_BOX(vbox), logo_image, FALSE, FALSE, 0);
#endif
sciteproj_label = gtk_label_new(NULL);
gtk_label_set_selectable(GTK_LABEL(sciteproj_label), FALSE);
gtk_label_set_markup(GTK_LABEL(sciteproj_label), "<big><b>SciteProj</b></big>");
#if GTK_MAJOR_VERSION>=3
gtk_grid_attach_next_to(GTK_GRID(grid), sciteproj_label, logo_image, GTK_POS_BOTTOM, 5, 1);
#else
gtk_box_pack_start(GTK_BOX(vbox), sciteproj_label, FALSE, FALSE, 0);
#endif
// Show version of SciteProj
gchar *about_dialog_version_string;
#ifdef _DEBUG
#ifdef _DEBUG
about_dialog_version_string = g_strdup_printf("%s DEBUG",version_string);
#else
about_dialog_version_string = g_strdup_printf("%s", version_string);
......@@ -140,11 +122,7 @@ void create_about_dialog()
version_string_label = gtk_label_new(about_dialog_version_string);
gtk_label_set_selectable(GTK_LABEL(version_string_label), FALSE);
#if GTK_MAJOR_VERSION >= 3
gtk_grid_attach_next_to(GTK_GRID(grid), version_string_label, sciteproj_label, GTK_POS_BOTTOM, 5, 1);
#else
gtk_box_pack_start(GTK_BOX(vbox), version_string_label, FALSE, FALSE, 0);
#endif
// Show SciteProj copyrights
copyrightstring = g_strdup_printf("Copyright (C) 2008-2017 Andreas Rönnquist <andreas@ronnquist.net>");
......@@ -152,11 +130,7 @@ void create_about_dialog()
copyright_label = gtk_label_new(copyrightstring);
gtk_label_set_selectable(GTK_LABEL(copyright_label), FALSE);
#if GTK_MAJOR_VERSION >= 3
gtk_grid_attach_next_to(GTK_GRID(grid), copyright_label, version_string_label, GTK_POS_BOTTOM, 5, 1);
#else
gtk_box_pack_start(GTK_BOX(vbox), copyright_label, FALSE, FALSE, 0);
#endif
// show GTK versions
gchar *gtk_string = g_strdup_printf("GTK+ %d.%d.%d / GLib %d.%d.%d",
......@@ -168,24 +142,13 @@ void create_about_dialog()
gtk_label_set_selectable(GTK_LABEL(gtk_version_label), FALSE);
#if GTK_MAJOR_VERSION >= 3
gtk_grid_attach_next_to(GTK_GRID(grid), gtk_version_label, copyright_label, GTK_POS_BOTTOM, 5, 1);
#else
gtk_box_pack_start(GTK_BOX(vbox), gtk_version_label, FALSE, FALSE, 0);
GtkWidget *hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
#endif
// Show a link to the SciteProj homepage
linkbutton = gtk_link_button_new_with_label(homepage_string, homepage_string);
#if GTK_MAJOR_VERSION>=3
gtk_grid_attach_next_to(GTK_GRID(grid), linkbutton, gtk_version_label, GTK_POS_BOTTOM, 5, 1);
#else
gtk_box_pack_start(GTK_BOX(hbox), linkbutton, TRUE, FALSE, 0);
#endif
// New notebook - we want tabs for different sets of text
......@@ -285,20 +248,14 @@ void create_about_dialog()
gtk_container_add(GTK_CONTAINER(scrolled_window_info), textview_info);
//gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled_window_info, notebook_label1);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrolled_window_license, notebook_label2);
#if GTK_MAJOR_VERSION >= 3
gtk_widget_set_vexpand(notebook, TRUE);
gtk_widget_set_hexpand(notebook, TRUE);
gtk_grid_attach_next_to(GTK_GRID(grid), notebook, linkbutton/*gtk_version_label*/, GTK_POS_BOTTOM, 5, 1);
#else
gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
#endif
gtk_text_buffer_place_cursor(textbuffer_info, &iter);
gtk_text_buffer_select_range(textbuffer_info, &iter, &iter);
......@@ -308,23 +265,10 @@ void create_about_dialog()
gtk_button_set_use_underline(GTK_BUTTON(ok_button), TRUE);
gtk_button_set_label(GTK_BUTTON(ok_button), "_OK");
#if GTK_MAJOR_VERSION >= 3
gtk_widget_set_halign(ok_button, GTK_ALIGN_END);
gtk_widget_set_hexpand(ok_button, FALSE);
#endif
//gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
// gtk_grid_attach_next_to(GTK_GRID(grid), hbox, notebook, GTK_POS_BOTTOM, 5, 1);
#if GTK_MAJOR_VERSION >= 3
gtk_grid_attach_next_to(GTK_GRID(grid), ok_button, notebook, GTK_POS_BOTTOM, 5, 1);
#else
GtkWidget *ok_button_hbox = gtk_hbox_new(FALSE,0);
gtk_box_pack_end(GTK_BOX(ok_button_hbox), ok_button, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), ok_button_hbox, FALSE, FALSE, 0);
#endif
gtk_widget_grab_focus(ok_button);
......
/**
* about.h - about dialog for SciteProj
*
* Copyright 2008-2017 Andreas Rönnquist
* Copyright 2008-2018 Andreas Rönnquist
*
* This file is part of SciteProj.
*
......
......@@ -575,7 +575,7 @@ gchar *clean_folder(gchar *infolder)
len -= 2;
}
if (temp[len-1] == G_DIR_SEPARATOR) {
if (temp[len - 1] == G_DIR_SEPARATOR) {
result = g_strndup(temp, len - 1);
} else {
result = g_strdup(temp);
......
......@@ -22,12 +22,12 @@
#ifndef __HEADER_FILE_UTILS_
#define __HEADER_FILE_UTILS_
/*
/**
*
*/
extern gchar *current_directory;
/*
/**
*
*/
void init_file_utils();
......
......@@ -62,24 +62,17 @@ GdkCursor *busy_cursor = NULL;
*/
gboolean load_graphics(GtkWidget *widget, GError **err)
{
#if GTK_MAJOR_VERSION >= 3
GtkIconTheme *icon_theme;
icon_theme = gtk_icon_theme_get_default();
#endif
program_icon_pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)sciteproj_xpm);
if (prefs.use_stock_folder_icon) {
// use GTK_STOCK_DIRECTORY
#if GTK_MAJOR_VERSION >= 3
directory_closed_pixbuf = gtk_icon_theme_load_icon(icon_theme, "folder", 14, 0, NULL);
directory_open_pixbuf = gtk_icon_theme_load_icon(icon_theme, "folder", 14, 0, NULL);
#else
directory_closed_pixbuf = gtk_widget_render_icon(widget, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU, NULL);
directory_open_pixbuf = gtk_widget_render_icon(widget, GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU, NULL);
#endif
} else {
directory_open_pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)dir_open_xpm);
......
......@@ -25,6 +25,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
/*
#ifndef GDK_KEY_Return
#define GDK_KEY_BackSpace GDK_BackSpace
#define GDK_KEY_Delete GDK_Delete
......@@ -35,6 +36,7 @@
#define GDK_KEY_F2 GDK_F2
#define GDK_KEY_F5 GDK_F5
#endif
*/
#endif /*__HEADER_GTK3_COMPAT_*/
This diff is collapsed.
/**
* gui_callbacks.c - GUI callback code for SciteProj
*
* Copyright 2006 Roy Wood, 2009-2017 Andreas Rönnquist
* Copyright 2006 Roy Wood, 2009-2018 Andreas Rönnquist
*
* This file is part of SciteProj.
*
......@@ -204,7 +204,7 @@ void load_tree_at_iter(GtkTreeView *tree_view, GtkTreeIter *iter)
if (iter) {
if (gtk_tree_model_iter_children(tree_model, &child, iter)) {
remove_tree_node(&child,NULL);
remove_tree_node(&child, NULL);
gchar *folder_path;
......@@ -221,21 +221,21 @@ void load_tree_at_iter(GtkTreeView *tree_view, GtkTreeIter *iter)
GCompareFunc comparer = get_sort_order_of_folder(folder_path);
file_list=load_folder_to_list(folder_path, FALSE, comparer /*file_sort_by_extension_bigger_func*/, filter_list);
file_list = load_folder_to_list(folder_path, FALSE, comparer /*file_sort_by_extension_bigger_func*/, filter_list);
folder_list=load_folder_to_list(folder_path, TRUE, compare_strings_bigger, filter_list);
folder_list = load_folder_to_list(folder_path, TRUE, compare_strings_bigger, filter_list);
// Here we should filter out the unwanted items
add_tree_folderlist(iter, folder_list, folder_path);
if (file_list) {
//file_list=g_slist_reverse(file_list);
//file_list = g_slist_reverse(file_list);
add_tree_filelist(iter, file_list, NULL);
}
set_tree_node_expanded(iter,TRUE, NULL);
set_tree_node_expanded(iter, TRUE, NULL);
GtkTreePath *tree_path = gtk_tree_model_get_path(tree_model, iter);
......@@ -267,7 +267,7 @@ void row_expand_or_collapse_cb(GtkTreeView *tree_view, GtkTreeIter *iter,
GtkTreeModel *tree_model = gtk_tree_view_get_model(tree_view);
// make sure all icons the folder (and folders inside it) are set to a correct icon.
fix_folders_step_through(tree_view,*iter,tree_path);
fix_folders_step_through(tree_view, *iter,tree_path);
gchar *temp;
gboolean expanded;
......@@ -426,10 +426,10 @@ void refresh_folder_cb()
gchar *temp;
gtk_tree_model_get(tree_model, temp_iter, COLUMN_FILENAME, &temp, -1);
tree_path=gtk_tree_model_get_path(tree_model, temp_iter);
GtkTreeRowReference *row_reference=gtk_tree_row_reference_new(tree_model, tree_path);
tree_path = gtk_tree_model_get_path(tree_model, temp_iter);
GtkTreeRowReference *row_reference = gtk_tree_row_reference_new(tree_model, tree_path);
list_of_items=g_list_append(list_of_items, row_reference);
list_of_items = g_list_append(list_of_items, row_reference);
gtk_tree_path_free(tree_path);
......@@ -439,7 +439,7 @@ void refresh_folder_cb()
GList *node;
for (node = list_of_items; node != NULL; node = node -> next) {
tree_path=gtk_tree_row_reference_get_path((GtkTreeRowReference*)node->data);
tree_path = gtk_tree_row_reference_get_path((GtkTreeRowReference*)node->data);
if (tree_path) {
GtkTreeIter iter;
......@@ -448,7 +448,7 @@ void refresh_folder_cb()
}
}
g_list_foreach(list_of_items, (GFunc) gtk_tree_row_reference_free, NULL);
g_list_foreach(list_of_items, (GFunc)gtk_tree_row_reference_free, NULL);
}
GtkTreeIter *temp_iter = gtk_tree_iter_copy(stored_iter);
......
/**
* gui_callbacks.h - GUI callback code for SciteProj
*
* Copyright 2006 Roy Wood, 2009-2017 Andreas Rönnquist
* Copyright 2006 Roy Wood, 2009-2018 Andreas Rönnquist
*
* This file is part of SciteProj.
*
......
......@@ -128,10 +128,11 @@ int main(int argc, char *argv[])
gtk_init(&argc, &argv);
// Since glib 2.36, this isn't needed
/*
#if GLIB_MAJOR_VERSION<=2 && GLIB_MINOR_VERSION<36
g_type_init();
#endif
*/
init_file_utils();
......
......@@ -37,19 +37,17 @@
#include "string_utils.h"
#include "file_utils.h"
/**
* My set align
*/
void my_set_align(GtkWidget *widget)
{
#if GTK_MAJOR_VERSION>=3
gtk_widget_set_halign(widget, GTK_ALIGN_START);
gtk_widget_set_valign(widget, GTK_ALIGN_START);
#else
gtk_misc_set_alignment(GTK_MISC(widget), 0, 0);
#endif
}
/**
* Group properties callback
*/
......@@ -59,8 +57,9 @@ void group_properties_gui(GtkTreeModel *tree_model, GtkTreeIter *iter)
gchar *nodename = NULL;
GtkWidget *table;
GtkWidget *label1,*label2;
GtkWidget *label1, *label2;
GtkWidget *filename, *filepath_label;
GtkWidget *container_box = NULL;
gchar *filePath = NULL;
int nodeType = -1;
......@@ -71,12 +70,8 @@ void group_properties_gui(GtkTreeModel *tree_model, GtkTreeIter *iter)
COLUMN_FILEPATH, &filePath,
-1);
#if GTK_MAJOR_VERSION>=3
dialog = gtk_dialog_new_with_buttons(_("Group Properties"), NULL, GTK_DIALOG_MODAL,
_("OK"), GTK_RESPONSE_ACCEPT, NULL);
#else
dialog = gtk_dialog_new_with_buttons(_("Group Properties"), NULL, GTK_DIALOG_MODAL, GTK_STOCK_OK,GTK_RESPONSE_OK,NULL);
#endif
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
......@@ -94,34 +89,19 @@ void group_properties_gui(GtkTreeModel *tree_model, GtkTreeIter *iter)
my_set_align(label1);
my_set_align(label2);
#if GTK_MAJOR_VERSION>=3
table = gtk_grid_new();
gtk_grid_attach(GTK_GRID(table), label1, 0, 0, 1, 1);
gtk_grid_attach(GTK_GRID(table), label2, 0, 1, 1, 1);
gtk_grid_attach(GTK_GRID(table),filename, 1, 0, 4, 1);
gtk_grid_attach(GTK_GRID(table),filepath_label, 1, 1, 4, 1);
gtk_grid_set_row_spacing (GTK_GRID (table), 6);
gtk_grid_set_column_spacing (GTK_GRID (table), 6);
#else
table = gtk_table_new(3,3,FALSE);
gtk_table_attach_defaults(GTK_TABLE(table), label1, 0, 1, 0, 1);
gtk_table_attach_defaults(GTK_TABLE(table), label2, 0, 1, 1, 2);
gtk_table_attach_defaults(GTK_TABLE(table), filename, 1, 2, 0, 1);
gtk_table_attach_defaults(GTK_TABLE(table), filepath_label, 1, 2, 1, 2);
gtk_grid_attach(GTK_GRID(table), filename, 1, 0, 4, 1);
gtk_grid_attach(GTK_GRID(table), filepath_label, 1, 1, 4, 1);
gtk_table_set_row_spacings(GTK_TABLE(table), 5);
gtk_table_set_col_spacings(GTK_TABLE(table), 5);
gtk_grid_set_row_spacing(GTK_GRID (table), 6);
gtk_grid_set_column_spacing(GTK_GRID (table), 6);
gtk_container_set_border_width(GTK_CONTAINER(table), 5);
#endif
GtkWidget *container_vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_box_pack_start(GTK_BOX(container_vbox), table, TRUE, TRUE, 0);
container_box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_box_pack_start(GTK_BOX(container_box), table, TRUE, TRUE, 0);
set_dialog_transient(dialog);
......@@ -150,7 +130,7 @@ void file_properties_gui(GtkTreeModel *model, GtkTreeIter *iter)
GtkWidget *table;
GtkWidget *label1, *label2, *label3;
GtkWidget *path, *filename, *filesize_label;
GtkWidget *container_vbox = NULL;
GtkWidget *container_box = NULL;
GtkWidget *dialog;
gchar *filePath = NULL;
......@@ -165,12 +145,8 @@ void file_properties_gui(GtkTreeModel *model, GtkTreeIter *iter)
debug_printf((gchar*)"Node name: %s\n", nodename);
debug_printf((gchar*)"File name: %s\n", filePath);
#if GTK_MAJOR_VERSION>=3
dialog = gtk_dialog_new_with_buttons(_("File Properties"), NULL, GTK_DIALOG_MODAL,
_("OK"), GTK_RESPONSE_ACCEPT,NULL);
#else
dialog = gtk_dialog_new_with_buttons(_("File Properties"),NULL,GTK_DIALOG_MODAL,GTK_STOCK_OK,GTK_RESPONSE_OK,NULL);
#endif
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
gchar *absFilePath = NULL; //g_strdup_printf("%s",filePath);
......@@ -209,7 +185,6 @@ void file_properties_gui(GtkTreeModel *model, GtkTreeIter *iter)
my_set_align(label2);
my_set_align(label3);
#if GTK_MAJOR_VERSION >= 3
table = gtk_grid_new();
gtk_grid_attach(GTK_GRID(table), label1, 0, 0, 1, 1);
......@@ -223,25 +198,9 @@ void file_properties_gui(GtkTreeModel *model, GtkTreeIter *iter)
gtk_grid_set_row_spacing (GTK_GRID (table), 6);
gtk_grid_set_column_spacing (GTK_GRID (table), 6);
#else
table=gtk_table_new(3,2,FALSE);
gtk_table_attach_defaults(GTK_TABLE(table), label1, 0, 1, 0, 1);
gtk_table_attach_defaults(GTK_TABLE(table), label2, 0, 1, 1, 2);
gtk_table_attach_defaults(GTK_TABLE(table), label3, 0, 1, 2, 3);
gtk_table_attach_defaults(GTK_TABLE(table), filename, 1, 2, 0, 1);
gtk_table_attach_defaults(GTK_TABLE(table), path, 1, 2, 1, 2);
gtk_table_attach_defaults(GTK_TABLE(table), filesize_label, 1, 2, 2, 3);
gtk_table_set_row_spacings(GTK_TABLE(table), 5);
gtk_table_set_col_spacings(GTK_TABLE(table), 5);
gtk_container_set_border_width(GTK_CONTAINER(table), 5);
#endif
container_vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_box_pack_start(GTK_BOX(container_vbox), table, TRUE, TRUE, 0);
container_box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
gtk_box_pack_start(GTK_BOX(container_box), table, TRUE, TRUE, 0);
set_dialog_transient(dialog);
......
/**
* properties_dialog.h - Properties Dialogs code for SciteProj
*
* Copyright 2009-2017 Andreas Rönnquist
* Copyright 2009-2018 Andreas Rönnquist
*
* This file is part of SciteProj.
*
......
......@@ -425,19 +425,9 @@ static gboolean recent_mouse_button_pressed_cb(GtkWidget *treeView, GdkEventButt
// Pop up the appropriate menu for the node type
//if (nodeItemType == ITEMTYPE_FILE) {
#if ((GTK_MAJOR_VERSION >= 3) && (GTK_MINOR_VERSION >= 22))
if (recentPopupMenu) {
gtk_menu_popup_at_pointer(GTK_MENU(recentPopupMenu), (GdkEvent*)event);
}
#else
gtk_menu_popup(GTK_MENU(recentPopupMenu),
NULL,
NULL,
NULL,
NULL,
event->button,
gdk_event_get_time((GdkEvent*) event));
#endif
/*
}
else if (nodeItemType == ITEMTYPE_GROUP) {
......
......@@ -58,11 +58,7 @@ gboolean init_statusbar(GtkWidget *widget, GtkWidget *next_to, GError **err)
gtk_widget_set_size_request(statusbar, -1, 20);
#if GTK_MAJOR_VERSION >= 3
gtk_grid_attach_next_to(GTK_GRID(widget), statusbar, next_to, GTK_POS_BOTTOM, 1, 1);
#else
gtk_box_pack_end (GTK_BOX (widget), statusbar, FALSE, FALSE, 0);
#endif
gtk_widget_show (statusbar);
......
......@@ -67,9 +67,9 @@ enum {
#define TYPE_FILESIZE G_TYPE_STRING
#define TYPE_FONTWEIGHT G_TYPE_INT
#define TYPE_FONTWEIGHTSET G_TYPE_BOOLEAN
#define TYPE_ICON GDK_TYPE_PIXBUF
#define TYPE_ICON GDK_TYPE_PIXBUF
#define TYPE_EXPANDED G_TYPE_BOOLEAN
#define TYPE_FOLDER_CONTENT_LOADED G_TYPE_BOOLEAN
#define TYPE_FOLDER_CONTENT_LOADED G_TYPE_BOOLEAN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment