mirror of
https://github.com/moparisthebest/hexchat
synced 2024-12-01 13:42:16 -05:00
Update most deprecated gtk functions
This commit is contained in:
parent
fa1eb92a7b
commit
ce09cb4a91
@ -870,16 +870,15 @@ chanlist_opengui (server *serv, int do_refresh)
|
|||||||
|
|
||||||
wid = gtk_check_button_new_with_label (_("Channel name"));
|
wid = gtk_check_button_new_with_label (_("Channel name"));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), TRUE);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), TRUE);
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "toggled",
|
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||||
GTK_SIGNAL_FUNC
|
G_CALLBACK(chanlist_match_channel_button_toggled), serv);
|
||||||
(chanlist_match_channel_button_toggled), serv);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
|
|
||||||
wid = gtk_check_button_new_with_label (_("Topic"));
|
wid = gtk_check_button_new_with_label (_("Topic"));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), TRUE);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), TRUE);
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "toggled",
|
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||||
GTK_SIGNAL_FUNC (chanlist_match_topic_button_toggled),
|
G_CALLBACK (chanlist_match_topic_button_toggled),
|
||||||
serv);
|
serv);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
@ -895,11 +894,11 @@ chanlist_opengui (server *serv, int do_refresh)
|
|||||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
|
|
||||||
wid = gtk_combo_box_new_text ();
|
wid = gtk_combo_box_text_new ();
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (wid), _("Simple Search"));
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (wid), _("Simple Search"));
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (wid), _("Pattern Match (Wildcards)"));
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (wid), _("Pattern Match (Wildcards)"));
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (wid), _("Regular Expression"));
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (wid), _("Regular Expression"));
|
||||||
#endif
|
#endif
|
||||||
gtk_combo_box_set_active (GTK_COMBO_BOX (wid), serv->gui->chanlist_search_type);
|
gtk_combo_box_set_active (GTK_COMBO_BOX (wid), serv->gui->chanlist_search_type);
|
||||||
gtk_table_attach (GTK_TABLE (table), wid, 1, 2, 1, 2,
|
gtk_table_attach (GTK_TABLE (table), wid, 1, 2, 1, 2,
|
||||||
@ -916,11 +915,12 @@ chanlist_opengui (server *serv, int do_refresh)
|
|||||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
|
|
||||||
wid = gtk_entry_new_with_max_length (255);
|
wid = gtk_entry_new ();
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "changed",
|
gtk_entry_set_max_length (GTK_ENTRY(wid), 255);
|
||||||
GTK_SIGNAL_FUNC (chanlist_find_cb), serv);
|
g_signal_connect (G_OBJECT (wid), "changed",
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "activate",
|
G_CALLBACK (chanlist_find_cb), serv);
|
||||||
GTK_SIGNAL_FUNC (chanlist_search_pressed),
|
g_signal_connect (G_OBJECT (wid), "activate",
|
||||||
|
G_CALLBACK (chanlist_search_pressed),
|
||||||
(gpointer) serv);
|
(gpointer) serv);
|
||||||
gtk_table_attach (GTK_TABLE (table), wid, 1, 2, 0, 1,
|
gtk_table_attach (GTK_TABLE (table), wid, 1, 2, 0, 1,
|
||||||
GTK_EXPAND | GTK_FILL, 0, 0, 0);
|
GTK_EXPAND | GTK_FILL, 0, 0, 0);
|
||||||
|
@ -87,7 +87,7 @@ static void custom_list_sortable_set_sort_func (GtkTreeSortable * sortable,
|
|||||||
gint sort_col_id,
|
gint sort_col_id,
|
||||||
GtkTreeIterCompareFunc
|
GtkTreeIterCompareFunc
|
||||||
sort_func, gpointer user_data,
|
sort_func, gpointer user_data,
|
||||||
GtkDestroyNotify
|
GDestroyNotify
|
||||||
destroy_func);
|
destroy_func);
|
||||||
|
|
||||||
static void custom_list_sortable_set_default_sort_func (GtkTreeSortable *
|
static void custom_list_sortable_set_default_sort_func (GtkTreeSortable *
|
||||||
@ -95,7 +95,7 @@ static void custom_list_sortable_set_default_sort_func (GtkTreeSortable *
|
|||||||
GtkTreeIterCompareFunc
|
GtkTreeIterCompareFunc
|
||||||
sort_func,
|
sort_func,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GtkDestroyNotify
|
GDestroyNotify
|
||||||
destroy_func);
|
destroy_func);
|
||||||
|
|
||||||
static gboolean custom_list_sortable_has_default_sort_func (GtkTreeSortable *
|
static gboolean custom_list_sortable_has_default_sort_func (GtkTreeSortable *
|
||||||
@ -601,7 +601,7 @@ custom_list_sortable_set_sort_func (GtkTreeSortable * sortable,
|
|||||||
gint sort_col_id,
|
gint sort_col_id,
|
||||||
GtkTreeIterCompareFunc sort_func,
|
GtkTreeIterCompareFunc sort_func,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GtkDestroyNotify destroy_func)
|
GDestroyNotify destroy_func)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,7 +609,7 @@ static void
|
|||||||
custom_list_sortable_set_default_sort_func (GtkTreeSortable * sortable,
|
custom_list_sortable_set_default_sort_func (GtkTreeSortable * sortable,
|
||||||
GtkTreeIterCompareFunc sort_func,
|
GtkTreeIterCompareFunc sort_func,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GtkDestroyNotify destroy_func)
|
GDestroyNotify destroy_func)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -757,7 +757,7 @@ fe_set_lag (server *serv, int lag)
|
|||||||
if (sess->gui->lagometer)
|
if (sess->gui->lagometer)
|
||||||
{
|
{
|
||||||
gtk_progress_bar_set_fraction ((GtkProgressBar *) sess->gui->lagometer, per);
|
gtk_progress_bar_set_fraction ((GtkProgressBar *) sess->gui->lagometer, per);
|
||||||
add_tip (gtk_widget_get_parent (sess->gui->lagometer), lagtip);
|
gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->lagometer), lagtip);
|
||||||
}
|
}
|
||||||
if (sess->gui->laginfo)
|
if (sess->gui->laginfo)
|
||||||
gtk_label_set_text ((GtkLabel *) sess->gui->laginfo, lagtext);
|
gtk_label_set_text ((GtkLabel *) sess->gui->laginfo, lagtext);
|
||||||
@ -803,7 +803,7 @@ fe_set_throttle (server *serv)
|
|||||||
if (sess->gui->throttlemeter)
|
if (sess->gui->throttlemeter)
|
||||||
{
|
{
|
||||||
gtk_progress_bar_set_fraction ((GtkProgressBar *) sess->gui->throttlemeter, per);
|
gtk_progress_bar_set_fraction ((GtkProgressBar *) sess->gui->throttlemeter, per);
|
||||||
add_tip (gtk_widget_get_parent (sess->gui->throttlemeter), tip);
|
gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->throttlemeter), tip);
|
||||||
}
|
}
|
||||||
if (sess->gui->throttleinfo)
|
if (sess->gui->throttleinfo)
|
||||||
gtk_label_set_text ((GtkLabel *) sess->gui->throttleinfo, tbuf);
|
gtk_label_set_text ((GtkLabel *) sess->gui->throttleinfo, tbuf);
|
||||||
|
@ -56,9 +56,6 @@
|
|||||||
|
|
||||||
#include "banlist.h"
|
#include "banlist.h"
|
||||||
|
|
||||||
#undef gtk_signal_connect
|
|
||||||
#define gtk_signal_connect g_signal_connect
|
|
||||||
|
|
||||||
#define flag_c flag_wid[0]
|
#define flag_c flag_wid[0]
|
||||||
#define flag_n flag_wid[1]
|
#define flag_n flag_wid[1]
|
||||||
#define flag_r flag_wid[2]
|
#define flag_r flag_wid[2]
|
||||||
|
@ -586,8 +586,8 @@ key_dialog_make_toggle (char *label, void *callback, void *option,
|
|||||||
|
|
||||||
wid = gtk_check_button_new_with_label (label);
|
wid = gtk_check_button_new_with_label (label);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), 0);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), 0);
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "toggled",
|
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||||
GTK_SIGNAL_FUNC (callback), option);
|
G_CALLBACK (callback), option);
|
||||||
gtk_box_pack_end (GTK_BOX (box), wid, 0, 0, 0);
|
gtk_box_pack_end (GTK_BOX (box), wid, 0, 0, 0);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
|
|
||||||
@ -610,7 +610,7 @@ key_dialog_make_entry (char *label, char *act, void *callback, void *option,
|
|||||||
wid = gtk_entry_new ();
|
wid = gtk_entry_new ();
|
||||||
if (act)
|
if (act)
|
||||||
{
|
{
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), act, GTK_SIGNAL_FUNC (callback),
|
g_signal_connect (G_OBJECT (wid), act, G_CALLBACK (callback),
|
||||||
option);
|
option);
|
||||||
}
|
}
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0);
|
||||||
@ -744,13 +744,13 @@ key_dialog_show ()
|
|||||||
gtk_box_pack_end (GTK_BOX (hbox), vbox2, 1, 1, 0);
|
gtk_box_pack_end (GTK_BOX (hbox), vbox2, 1, 1, 0);
|
||||||
wid = gtk_button_new_with_label (_("Add New"));
|
wid = gtk_button_new_with_label (_("Add New"));
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), wid, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), wid, 0, 0, 0);
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "clicked",
|
g_signal_connect (G_OBJECT (wid), "clicked",
|
||||||
GTK_SIGNAL_FUNC (key_dialog_add_new), list);
|
G_CALLBACK (key_dialog_add_new), list);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
wid = gtk_button_new_with_label (_("Delete"));
|
wid = gtk_button_new_with_label (_("Delete"));
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), wid, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), wid, 0, 0, 0);
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "clicked",
|
g_signal_connect (G_OBJECT (wid), "clicked",
|
||||||
GTK_SIGNAL_FUNC (key_dialog_delete), list);
|
G_CALLBACK (key_dialog_delete), list);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
gtk_widget_show (vbox2);
|
gtk_widget_show (vbox2);
|
||||||
|
|
||||||
@ -762,8 +762,8 @@ key_dialog_show ()
|
|||||||
wid3 = gtk_menu_item_new_with_label (_(key_actions[i].name));
|
wid3 = gtk_menu_item_new_with_label (_(key_actions[i].name));
|
||||||
gtk_widget_show (wid3);
|
gtk_widget_show (wid3);
|
||||||
gtk_menu_shell_append (GTK_MENU_SHELL (wid2), wid3);
|
gtk_menu_shell_append (GTK_MENU_SHELL (wid2), wid3);
|
||||||
gtk_signal_connect (GTK_OBJECT (wid3), "activate",
|
g_signal_connect (G_OBJECT (wid3), "activate",
|
||||||
GTK_SIGNAL_FUNC (key_dialog_sel_act),
|
G_CALLBACK (key_dialog_sel_act),
|
||||||
GINT_TO_POINTER (i));
|
GINT_TO_POINTER (i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ gtkutil_button (GtkWidget *box, char *stock, char *tip, void *callback,
|
|||||||
G_CALLBACK (callback), userdata);
|
G_CALLBACK (callback), userdata);
|
||||||
gtk_widget_show (wid);
|
gtk_widget_show (wid);
|
||||||
if (tip)
|
if (tip)
|
||||||
add_tip (wid, tip);
|
gtk_widget_set_tooltip_text (wid, tip);
|
||||||
|
|
||||||
return wid;
|
return wid;
|
||||||
}
|
}
|
||||||
@ -546,15 +546,6 @@ gtkutil_clist_multiple_selection (GtkWidget * clist, int ** rows, const int max_
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
add_tip (GtkWidget * wid, char *text)
|
|
||||||
{
|
|
||||||
static GtkTooltips *tip = NULL;
|
|
||||||
if (!tip)
|
|
||||||
tip = gtk_tooltips_new ();
|
|
||||||
gtk_tooltips_set_tip (tip, wid, text, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
show_and_unfocus (GtkWidget * wid)
|
show_and_unfocus (GtkWidget * wid)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,6 @@ GtkWidget *gtkutil_clist_new (int columns, char *titles[], GtkWidget * box,
|
|||||||
int gtkutil_clist_selection (GtkWidget * clist);
|
int gtkutil_clist_selection (GtkWidget * clist);
|
||||||
int gtkutil_clist_multiple_selection (GtkWidget * clist,
|
int gtkutil_clist_multiple_selection (GtkWidget * clist,
|
||||||
int ** rows, const int max_rows);
|
int ** rows, const int max_rows);
|
||||||
void add_tip (GtkWidget * wid, char *text);
|
|
||||||
void show_and_unfocus (GtkWidget * wid);
|
void show_and_unfocus (GtkWidget * wid);
|
||||||
void gtkutil_set_icon (GtkWidget *win);
|
void gtkutil_set_icon (GtkWidget *win);
|
||||||
GtkWidget *gtkutil_window_new (char *title, char *role, int width, int height, int flags);
|
GtkWidget *gtkutil_window_new (char *title, char *role, int width, int height, int flags);
|
||||||
|
@ -172,7 +172,7 @@ ignore_treeview_new (GtkWidget *box)
|
|||||||
for (col_id=0; (col = gtk_tree_view_get_column (GTK_TREE_VIEW (view), col_id));
|
for (col_id=0; (col = gtk_tree_view_get_column (GTK_TREE_VIEW (view), col_id));
|
||||||
col_id++)
|
col_id++)
|
||||||
{
|
{
|
||||||
GList *list = gtk_tree_view_column_get_cell_renderers (col);
|
GList *list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (col));
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
for (tmp = list; tmp; tmp = tmp->next)
|
for (tmp = list; tmp; tmp = tmp->next)
|
||||||
|
@ -692,17 +692,17 @@ mg_set_topic_tip (session *sess)
|
|||||||
{
|
{
|
||||||
text = g_strdup_printf (_("Topic for %s is: %s"), sess->channel,
|
text = g_strdup_printf (_("Topic for %s is: %s"), sess->channel,
|
||||||
sess->topic);
|
sess->topic);
|
||||||
add_tip (sess->gui->topic_entry, text);
|
gtk_widget_set_tooltip_text (sess->gui->topic_entry, text);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
} else
|
} else
|
||||||
add_tip (sess->gui->topic_entry, _("No topic is set"));
|
gtk_widget_set_tooltip_text (sess->gui->topic_entry, _("No topic is set"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry)) &&
|
if (gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry)) &&
|
||||||
gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry))[0])
|
gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry))[0])
|
||||||
add_tip (sess->gui->topic_entry, (char *)gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry)));
|
gtk_widget_set_tooltip_text (sess->gui->topic_entry, (char *)gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry)));
|
||||||
else
|
else
|
||||||
add_tip (sess->gui->topic_entry, NULL);
|
gtk_widget_set_tooltip_text (sess->gui->topic_entry, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -935,14 +935,14 @@ mg_populate (session *sess)
|
|||||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (gui->lagometer),
|
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (gui->lagometer),
|
||||||
res->lag_value);
|
res->lag_value);
|
||||||
if (res->lag_tip)
|
if (res->lag_tip)
|
||||||
add_tip (gtk_widget_get_parent (sess->gui->lagometer), res->lag_tip);
|
gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->lagometer), res->lag_tip);
|
||||||
}
|
}
|
||||||
if (gui->throttlemeter)
|
if (gui->throttlemeter)
|
||||||
{
|
{
|
||||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (gui->throttlemeter),
|
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (gui->throttlemeter),
|
||||||
res->queue_value);
|
res->queue_value);
|
||||||
if (res->queue_tip)
|
if (res->queue_tip)
|
||||||
add_tip (gtk_widget_get_parent (sess->gui->throttlemeter), res->queue_tip);
|
gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->throttlemeter), res->queue_tip);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* did this tab have a connecting graph? restore it.. */
|
/* did this tab have a connecting graph? restore it.. */
|
||||||
@ -1192,7 +1192,6 @@ mg_open_quit_dialog (gboolean minimize_button)
|
|||||||
gtk_window_set_title (GTK_WINDOW (dialog), _("Quit HexChat?"));
|
gtk_window_set_title (GTK_WINDOW (dialog), _("Quit HexChat?"));
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
|
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
|
||||||
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
||||||
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
|
|
||||||
|
|
||||||
dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||||
gtk_widget_show (dialog_vbox1);
|
gtk_widget_show (dialog_vbox1);
|
||||||
@ -1994,7 +1993,7 @@ mg_create_flagbutton (char *tip, GtkWidget *box, char *face)
|
|||||||
|
|
||||||
wid = gtk_toggle_button_new_with_label (face);
|
wid = gtk_toggle_button_new_with_label (face);
|
||||||
gtk_widget_set_size_request (wid, 18, 0);
|
gtk_widget_set_size_request (wid, 18, 0);
|
||||||
add_tip (wid, tip);
|
gtk_widget_set_tooltip_text (wid, tip);
|
||||||
gtk_box_pack_start (GTK_BOX (box), wid, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (box), wid, 0, 0, 0);
|
||||||
g_signal_connect (G_OBJECT (wid), "toggled",
|
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||||
G_CALLBACK (mg_flagbutton_cb), face);
|
G_CALLBACK (mg_flagbutton_cb), face);
|
||||||
@ -2936,21 +2935,21 @@ mg_create_search(session *sess, GtkWidget *box)
|
|||||||
g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_highlight_all);
|
g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_highlight_all);
|
||||||
g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_handle_refresh), sess);
|
g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_handle_refresh), sess);
|
||||||
gtk_box_pack_start(GTK_BOX(gui->shbox), highlight, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(gui->shbox), highlight, FALSE, FALSE, 0);
|
||||||
add_tip (highlight, _("Highlight all occurrences, and underline the current occurrence."));
|
gtk_widget_set_tooltip_text (highlight, _("Highlight all occurrences, and underline the current occurrence."));
|
||||||
|
|
||||||
matchcase = gtk_check_button_new_with_mnemonic (_("Mat_ch case"));
|
matchcase = gtk_check_button_new_with_mnemonic (_("Mat_ch case"));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(matchcase), prefs.hex_text_search_case_match);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(matchcase), prefs.hex_text_search_case_match);
|
||||||
gtk_widget_set_can_focus (matchcase, FALSE);
|
gtk_widget_set_can_focus (matchcase, FALSE);
|
||||||
g_signal_connect (G_OBJECT (matchcase), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_case_match);
|
g_signal_connect (G_OBJECT (matchcase), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_case_match);
|
||||||
gtk_box_pack_start(GTK_BOX(gui->shbox), matchcase, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(gui->shbox), matchcase, FALSE, FALSE, 0);
|
||||||
add_tip (matchcase, _("Perform a case-sensitive search."));
|
gtk_widget_set_tooltip_text (matchcase, _("Perform a case-sensitive search."));
|
||||||
|
|
||||||
regex = gtk_check_button_new_with_mnemonic (_("_Regex"));
|
regex = gtk_check_button_new_with_mnemonic (_("_Regex"));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(regex), prefs.hex_text_search_regexp);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(regex), prefs.hex_text_search_regexp);
|
||||||
gtk_widget_set_can_focus (regex, FALSE);
|
gtk_widget_set_can_focus (regex, FALSE);
|
||||||
g_signal_connect (G_OBJECT (regex), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_regexp);
|
g_signal_connect (G_OBJECT (regex), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_regexp);
|
||||||
gtk_box_pack_start(GTK_BOX(gui->shbox), regex, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(gui->shbox), regex, FALSE, FALSE, 0);
|
||||||
add_tip (regex, _("Regard search string as a regular expression."));
|
gtk_widget_set_tooltip_text (regex, _("Regard search string as a regular expression."));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1689,7 +1689,7 @@ menu_about (GtkWidget *wid, gpointer sess)
|
|||||||
#endif
|
#endif
|
||||||
get_sys_str (0));
|
get_sys_str (0));
|
||||||
|
|
||||||
gtk_about_dialog_set_name (dialog, DISPLAY_NAME);
|
gtk_about_dialog_set_program_name (dialog, DISPLAY_NAME);
|
||||||
gtk_about_dialog_set_version (dialog, PACKAGE_VERSION);
|
gtk_about_dialog_set_version (dialog, PACKAGE_VERSION);
|
||||||
gtk_about_dialog_set_license (dialog, license); /* gtk3 can use GTK_LICENSE_GPL_2_0 */
|
gtk_about_dialog_set_license (dialog, license); /* gtk3 can use GTK_LICENSE_GPL_2_0 */
|
||||||
gtk_about_dialog_set_website (dialog, "http://hexchat.github.io");
|
gtk_about_dialog_set_website (dialog, "http://hexchat.github.io");
|
||||||
|
@ -151,7 +151,7 @@ void
|
|||||||
fe_tray_set_tooltip (const char *text)
|
fe_tray_set_tooltip (const char *text)
|
||||||
{
|
{
|
||||||
if (sticon)
|
if (sticon)
|
||||||
gtk_status_icon_set_tooltip (sticon, text);
|
gtk_status_icon_set_tooltip_text (sticon, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1255,7 +1255,7 @@ servlist_create_entry (GtkWidget *table, char *labeltext, int row,
|
|||||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||||
|
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
add_tip (entry, tip);
|
gtk_widget_set_tooltip_text (entry, tip);
|
||||||
gtk_widget_show (entry);
|
gtk_widget_show (entry);
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), def ? def : "");
|
gtk_entry_set_text (GTK_ENTRY (entry), def ? def : "");
|
||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
|
||||||
@ -1573,7 +1573,7 @@ servlist_create_logintypecombo (GtkWidget *data)
|
|||||||
|
|
||||||
gtk_combo_box_set_active (GTK_COMBO_BOX (cb), servlist_get_login_desc_index (selected_net->logintype));
|
gtk_combo_box_set_active (GTK_COMBO_BOX (cb), servlist_get_login_desc_index (selected_net->logintype));
|
||||||
|
|
||||||
add_tip (cb, _("The way you identify yourself to the server. For custom login methods use connect commands."));
|
gtk_widget_set_tooltip_text (cb, _("The way you identify yourself to the server. For custom login methods use connect commands."));
|
||||||
g_signal_connect (G_OBJECT (GTK_BIN (cb)), "changed", G_CALLBACK (servlist_logintypecombo_cb), data);
|
g_signal_connect (G_OBJECT (GTK_BIN (cb)), "changed", G_CALLBACK (servlist_logintypecombo_cb), data);
|
||||||
|
|
||||||
return cb;
|
return cb;
|
||||||
@ -1682,7 +1682,7 @@ servlist_open_edit (GtkWidget *parent, ircnet *net)
|
|||||||
|
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
|
||||||
add_tip (scrolledwindow5, _("%n=Nick name\n%p=Password\n%r=Real name\n%u=User name"));
|
gtk_widget_set_tooltip_text (scrolledwindow5, _("%n=Nick name\n%p=Password\n%r=Real name\n%u=User name"));
|
||||||
|
|
||||||
|
|
||||||
/* Server Tree */
|
/* Server Tree */
|
||||||
@ -1804,7 +1804,7 @@ servlist_open_edit (GtkWidget *parent, ircnet *net)
|
|||||||
gtk_table_set_col_spacings (GTK_TABLE (table3), 8);
|
gtk_table_set_col_spacings (GTK_TABLE (table3), 8);
|
||||||
|
|
||||||
check = servlist_create_check (0, !(net->flags & FLAG_CYCLE), table3, 0, 0, _("Connect to selected server only"));
|
check = servlist_create_check (0, !(net->flags & FLAG_CYCLE), table3, 0, 0, _("Connect to selected server only"));
|
||||||
add_tip (check, _("Don't cycle through all the servers when the connection fails."));
|
gtk_widget_set_tooltip_text (check, _("Don't cycle through all the servers when the connection fails."));
|
||||||
servlist_create_check (3, net->flags & FLAG_AUTO_CONNECT, table3, 1, 0, _("Connect to this network automatically"));
|
servlist_create_check (3, net->flags & FLAG_AUTO_CONNECT, table3, 1, 0, _("Connect to this network automatically"));
|
||||||
servlist_create_check (4, !(net->flags & FLAG_USE_PROXY), table3, 2, 0, _("Bypass proxy server"));
|
servlist_create_check (4, !(net->flags & FLAG_USE_PROXY), table3, 2, 0, _("Bypass proxy server"));
|
||||||
check = servlist_create_check (2, net->flags & FLAG_USE_SSL, table3, 3, 0, _("Use SSL for all the servers on this network"));
|
check = servlist_create_check (2, net->flags & FLAG_USE_SSL, table3, 3, 0, _("Use SSL for all the servers on this network"));
|
||||||
@ -2103,7 +2103,7 @@ servlist_open_networks (void)
|
|||||||
gtk_widget_set_can_default (button_edit, TRUE);
|
gtk_widget_set_can_default (button_edit, TRUE);
|
||||||
|
|
||||||
button_sort = gtk_button_new_with_mnemonic (_("_Sort"));
|
button_sort = gtk_button_new_with_mnemonic (_("_Sort"));
|
||||||
add_tip (button_sort, _("Sorts the network list in alphabetical order. "
|
gtk_widget_set_tooltip_text (button_sort, _("Sorts the network list in alphabetical order. "
|
||||||
"Use SHIFT-UP and SHIFT-DOWN keys to move a row."));
|
"Use SHIFT-UP and SHIFT-DOWN keys to move a row."));
|
||||||
g_signal_connect (G_OBJECT (button_sort), "clicked",
|
g_signal_connect (G_OBJECT (button_sort), "clicked",
|
||||||
G_CALLBACK (servlist_sort), 0);
|
G_CALLBACK (servlist_sort), 0);
|
||||||
@ -2112,7 +2112,7 @@ servlist_open_networks (void)
|
|||||||
gtk_widget_set_can_default (button_sort, TRUE);
|
gtk_widget_set_can_default (button_sort, TRUE);
|
||||||
|
|
||||||
button_sort = gtk_button_new_with_mnemonic (_("_Favor"));
|
button_sort = gtk_button_new_with_mnemonic (_("_Favor"));
|
||||||
add_tip (button_sort, _("Mark or unmark this network as a favorite."));
|
gtk_widget_set_tooltip_text (button_sort, _("Mark or unmark this network as a favorite."));
|
||||||
g_signal_connect (G_OBJECT (button_sort), "clicked",
|
g_signal_connect (G_OBJECT (button_sort), "clicked",
|
||||||
G_CALLBACK (servlist_favor), 0);
|
G_CALLBACK (servlist_favor), 0);
|
||||||
gtk_widget_show (button_sort);
|
gtk_widget_show (button_sort);
|
||||||
|
@ -660,7 +660,7 @@ setup_create_3oggle (GtkWidget *tab, int row, const setting *set)
|
|||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
if (set->tooltip)
|
if (set->tooltip)
|
||||||
{
|
{
|
||||||
add_tip (label, _(set->tooltip));
|
gtk_widget_set_tooltip_text (label, _(set->tooltip));
|
||||||
}
|
}
|
||||||
gtk_table_attach (GTK_TABLE (tab), label, 2, 3, row, row + 1,
|
gtk_table_attach (GTK_TABLE (tab), label, 2, 3, row, row + 1,
|
||||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0);
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0);
|
||||||
@ -721,7 +721,7 @@ setup_create_toggleR (GtkWidget *tab, int row, const setting *set)
|
|||||||
g_signal_connect (G_OBJECT (wid), "toggled",
|
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||||
G_CALLBACK (setup_toggle_cb), (gpointer)set);
|
G_CALLBACK (setup_toggle_cb), (gpointer)set);
|
||||||
if (set->tooltip)
|
if (set->tooltip)
|
||||||
add_tip (wid, _(set->tooltip));
|
gtk_widget_set_tooltip_text (wid, _(set->tooltip));
|
||||||
gtk_table_attach (GTK_TABLE (tab), wid, 4, 5, row, row + 1,
|
gtk_table_attach (GTK_TABLE (tab), wid, 4, 5, row, row + 1,
|
||||||
GTK_EXPAND | GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
GTK_EXPAND | GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
|
||||||
}
|
}
|
||||||
@ -737,7 +737,7 @@ setup_create_toggleL (GtkWidget *tab, int row, const setting *set)
|
|||||||
g_signal_connect (G_OBJECT (wid), "toggled",
|
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||||
G_CALLBACK (setup_toggle_cb), (gpointer)set);
|
G_CALLBACK (setup_toggle_cb), (gpointer)set);
|
||||||
if (set->tooltip)
|
if (set->tooltip)
|
||||||
add_tip (wid, _(set->tooltip));
|
gtk_widget_set_tooltip_text (wid, _(set->tooltip));
|
||||||
gtk_table_attach (GTK_TABLE (tab), wid, 2, row==6 ? 6 : 4, row, row + 1,
|
gtk_table_attach (GTK_TABLE (tab), wid, 2, row==6 ? 6 : 4, row, row + 1,
|
||||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0);
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0);
|
||||||
|
|
||||||
@ -756,7 +756,7 @@ setup_create_toggle (GtkWidget *box, int row, const setting *set)
|
|||||||
g_signal_connect (G_OBJECT (wid), "toggled",
|
g_signal_connect (G_OBJECT (wid), "toggled",
|
||||||
G_CALLBACK (setup_toggle_cb), (gpointer)set);
|
G_CALLBACK (setup_toggle_cb), (gpointer)set);
|
||||||
if (set->tooltip)
|
if (set->tooltip)
|
||||||
add_tip (wid, _(set->tooltip));
|
gtk_widget_set_tooltip_text (wid, _(set->tooltip));
|
||||||
gtk_box_pack_start (GTK_BOX (box), wid, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (box), wid, 0, 0, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -802,7 +802,7 @@ setup_create_spin (GtkWidget *table, int row, const setting *set)
|
|||||||
wid = gtk_spin_button_new_with_range (0, set->extra, 1);
|
wid = gtk_spin_button_new_with_range (0, set->extra, 1);
|
||||||
g_object_set_data (G_OBJECT (wid), "lbl", label);
|
g_object_set_data (G_OBJECT (wid), "lbl", label);
|
||||||
if (set->tooltip)
|
if (set->tooltip)
|
||||||
add_tip (wid, _(set->tooltip));
|
gtk_widget_set_tooltip_text (wid, _(set->tooltip));
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (wid),
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (wid),
|
||||||
setup_get_int (&setup_prefs, set));
|
setup_get_int (&setup_prefs, set));
|
||||||
g_signal_connect (G_OBJECT (wid), "value_changed",
|
g_signal_connect (G_OBJECT (wid), "value_changed",
|
||||||
@ -928,7 +928,7 @@ setup_create_radio (GtkWidget *table, int row, const setting *set)
|
|||||||
{
|
{
|
||||||
wid = gtk_radio_button_new_with_mnemonic (group, _(text[i]));
|
wid = gtk_radio_button_new_with_mnemonic (group, _(text[i]));
|
||||||
/*if (set->tooltip)
|
/*if (set->tooltip)
|
||||||
add_tip (wid, _(set->tooltip));*/
|
gtk_widget_set_tooltip_text (wid, _(set->tooltip));*/
|
||||||
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (wid));
|
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (wid));
|
||||||
gtk_container_add (GTK_CONTAINER (hbox), wid);
|
gtk_container_add (GTK_CONTAINER (hbox), wid);
|
||||||
if (i == setup_get_int (&setup_prefs, set))
|
if (i == setup_get_int (&setup_prefs, set))
|
||||||
@ -1025,10 +1025,10 @@ setup_create_menu (GtkWidget *table, int row, const setting *set)
|
|||||||
gtk_table_attach (GTK_TABLE (table), wid, 2, 3, row, row + 1,
|
gtk_table_attach (GTK_TABLE (table), wid, 2, 3, row, row + 1,
|
||||||
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0);
|
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0);
|
||||||
|
|
||||||
cbox = gtk_combo_box_new_text ();
|
cbox = gtk_combo_box_text_new ();
|
||||||
|
|
||||||
for (i = 0; text[i]; i++)
|
for (i = 0; text[i]; i++)
|
||||||
gtk_combo_box_append_text (GTK_COMBO_BOX (cbox), _(text[i]));
|
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cbox), _(text[i]));
|
||||||
|
|
||||||
gtk_combo_box_set_active (GTK_COMBO_BOX (cbox),
|
gtk_combo_box_set_active (GTK_COMBO_BOX (cbox),
|
||||||
setup_get_int (&setup_prefs, set) - set->extra);
|
setup_get_int (&setup_prefs, set) - set->extra);
|
||||||
@ -1188,7 +1188,7 @@ setup_create_entry (GtkWidget *table, int row, const setting *set)
|
|||||||
if (set->list)
|
if (set->list)
|
||||||
gtk_entry_set_visibility (GTK_ENTRY (wid), FALSE);
|
gtk_entry_set_visibility (GTK_ENTRY (wid), FALSE);
|
||||||
if (set->tooltip)
|
if (set->tooltip)
|
||||||
add_tip (wid, _(set->tooltip));
|
gtk_widget_set_tooltip_text (wid, _(set->tooltip));
|
||||||
gtk_entry_set_max_length (GTK_ENTRY (wid), set->extra - 1);
|
gtk_entry_set_max_length (GTK_ENTRY (wid), set->extra - 1);
|
||||||
gtk_entry_set_text (GTK_ENTRY (wid), setup_get_str (&setup_prefs, set));
|
gtk_entry_set_text (GTK_ENTRY (wid), setup_get_str (&setup_prefs, set));
|
||||||
g_signal_connect (G_OBJECT (wid), "changed",
|
g_signal_connect (G_OBJECT (wid), "changed",
|
||||||
|
@ -93,7 +93,7 @@ static void sexy_spell_entry_class_init(SexySpellEntryClass *klass);
|
|||||||
static void sexy_spell_entry_editable_init (GtkEditableClass *iface);
|
static void sexy_spell_entry_editable_init (GtkEditableClass *iface);
|
||||||
static void sexy_spell_entry_init(SexySpellEntry *entry);
|
static void sexy_spell_entry_init(SexySpellEntry *entry);
|
||||||
static void sexy_spell_entry_finalize(GObject *obj);
|
static void sexy_spell_entry_finalize(GObject *obj);
|
||||||
static void sexy_spell_entry_destroy(GtkObject *obj);
|
static void sexy_spell_entry_destroy(GObject *obj);
|
||||||
static gint sexy_spell_entry_expose(GtkWidget *widget, GdkEventExpose *event);
|
static gint sexy_spell_entry_expose(GtkWidget *widget, GdkEventExpose *event);
|
||||||
static gint sexy_spell_entry_button_press(GtkWidget *widget, GdkEventButton *event);
|
static gint sexy_spell_entry_button_press(GtkWidget *widget, GdkEventButton *event);
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ static void
|
|||||||
sexy_spell_entry_class_init(SexySpellEntryClass *klass)
|
sexy_spell_entry_class_init(SexySpellEntryClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GtkObjectClass *object_class;
|
GObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
||||||
initialize_enchant();
|
initialize_enchant();
|
||||||
@ -206,7 +206,7 @@ sexy_spell_entry_class_init(SexySpellEntryClass *klass)
|
|||||||
parent_class = g_type_class_peek_parent(klass);
|
parent_class = g_type_class_peek_parent(klass);
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS(klass);
|
gobject_class = G_OBJECT_CLASS(klass);
|
||||||
object_class = GTK_OBJECT_CLASS(klass);
|
object_class = G_OBJECT_CLASS(klass);
|
||||||
widget_class = GTK_WIDGET_CLASS(klass);
|
widget_class = GTK_WIDGET_CLASS(klass);
|
||||||
|
|
||||||
if (have_enchant)
|
if (have_enchant)
|
||||||
@ -214,7 +214,7 @@ sexy_spell_entry_class_init(SexySpellEntryClass *klass)
|
|||||||
|
|
||||||
gobject_class->finalize = sexy_spell_entry_finalize;
|
gobject_class->finalize = sexy_spell_entry_finalize;
|
||||||
|
|
||||||
object_class->destroy = sexy_spell_entry_destroy;
|
object_class->dispose = sexy_spell_entry_destroy;
|
||||||
|
|
||||||
widget_class->expose_event = sexy_spell_entry_expose;
|
widget_class->expose_event = sexy_spell_entry_expose;
|
||||||
widget_class->button_press_event = sexy_spell_entry_button_press;
|
widget_class->button_press_event = sexy_spell_entry_button_press;
|
||||||
@ -783,10 +783,10 @@ sexy_spell_entry_finalize(GObject *obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sexy_spell_entry_destroy(GtkObject *obj)
|
sexy_spell_entry_destroy(GObject *obj)
|
||||||
{
|
{
|
||||||
if (GTK_OBJECT_CLASS(parent_class)->destroy)
|
if (G_OBJECT_CLASS(parent_class)->dispose)
|
||||||
GTK_OBJECT_CLASS(parent_class)->destroy(obj);
|
G_OBJECT_CLASS(parent_class)->dispose(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -384,7 +384,8 @@ pevent_dialog_show ()
|
|||||||
|
|
||||||
pevent_dialog_twid = gtk_xtext_new (colors, 0);
|
pevent_dialog_twid = gtk_xtext_new (colors, 0);
|
||||||
|
|
||||||
pevent_dialog_entry = gtk_entry_new_with_max_length (255);
|
pevent_dialog_entry = gtk_entry_new ();
|
||||||
|
gtk_entry_set_max_length (GTK_ENTRY (pevent_dialog_entry), 255);
|
||||||
g_signal_connect (G_OBJECT (pevent_dialog_entry), "activate",
|
g_signal_connect (G_OBJECT (pevent_dialog_entry), "activate",
|
||||||
G_CALLBACK (pevent_dialog_update), pevent_dialog_twid);
|
G_CALLBACK (pevent_dialog_update), pevent_dialog_twid);
|
||||||
gtk_box_pack_start (GTK_BOX (bh), pevent_dialog_entry, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (bh), pevent_dialog_entry, 0, 0, 0);
|
||||||
@ -394,7 +395,6 @@ pevent_dialog_show ()
|
|||||||
gtk_container_add (GTK_CONTAINER (bh), tbox);
|
gtk_container_add (GTK_CONTAINER (bh), tbox);
|
||||||
gtk_widget_show (tbox);
|
gtk_widget_show (tbox);
|
||||||
|
|
||||||
gtk_widget_set_usize (pevent_dialog_twid, 150, 20);
|
|
||||||
gtk_container_add (GTK_CONTAINER (tbox), pevent_dialog_twid);
|
gtk_container_add (GTK_CONTAINER (tbox), pevent_dialog_twid);
|
||||||
gtk_xtext_set_font (GTK_XTEXT (pevent_dialog_twid), prefs.hex_text_font);
|
gtk_xtext_set_font (GTK_XTEXT (pevent_dialog_twid), prefs.hex_text_font);
|
||||||
|
|
||||||
@ -418,8 +418,8 @@ pevent_dialog_show ()
|
|||||||
gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 2);
|
gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 2);
|
||||||
/*wid = gtk_button_new_with_label (_("Save"));
|
/*wid = gtk_button_new_with_label (_("Save"));
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), wid, 0, 0, 0);
|
gtk_box_pack_end (GTK_BOX (hbox), wid, 0, 0, 0);
|
||||||
gtk_signal_connect (GTK_OBJECT (wid), "clicked",
|
g_signal_connect (G_OBJECT (wid), "clicked",
|
||||||
GTK_SIGNAL_FUNC (pevent_save_cb), NULL);
|
G_CALLBACK (pevent_save_cb), NULL);
|
||||||
gtk_widget_show (wid);*/
|
gtk_widget_show (wid);*/
|
||||||
gtkutil_button (hbox, GTK_STOCK_SAVE_AS, NULL, pevent_save_cb,
|
gtkutil_button (hbox, GTK_STOCK_SAVE_AS, NULL, pevent_save_cb,
|
||||||
(void *) 1, _("Save As..."));
|
(void *) 1, _("Save As..."));
|
||||||
|
@ -67,6 +67,13 @@
|
|||||||
/* force scrolling off */
|
/* force scrolling off */
|
||||||
#define dontscroll(buf) (buf)->last_pixel_pos = 0x7fffffff
|
#define dontscroll(buf) (buf)->last_pixel_pos = 0x7fffffff
|
||||||
|
|
||||||
|
extern void gtk_marshal_VOID__POINTER_POINTER (GClosure *closure,
|
||||||
|
GValue *return_value,
|
||||||
|
guint n_param_values,
|
||||||
|
const GValue *param_values,
|
||||||
|
gpointer invocation_hint,
|
||||||
|
gpointer marshal_data);
|
||||||
|
|
||||||
static GtkWidgetClass *parent_class = NULL;
|
static GtkWidgetClass *parent_class = NULL;
|
||||||
|
|
||||||
struct textentry
|
struct textentry
|
||||||
@ -511,7 +518,7 @@ gtk_xtext_new (GdkColor palette[], int separator)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_xtext_destroy (GtkObject * object)
|
gtk_xtext_destroy (GObject * object)
|
||||||
{
|
{
|
||||||
GtkXText *xtext = GTK_XTEXT (object);
|
GtkXText *xtext = GTK_XTEXT (object);
|
||||||
|
|
||||||
@ -549,7 +556,7 @@ gtk_xtext_destroy (GtkObject * object)
|
|||||||
{
|
{
|
||||||
g_signal_handlers_disconnect_matched (G_OBJECT (xtext->adj),
|
g_signal_handlers_disconnect_matched (G_OBJECT (xtext->adj),
|
||||||
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, xtext);
|
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, xtext);
|
||||||
/* gtk_signal_disconnect_by_data (GTK_OBJECT (xtext->adj), xtext);*/
|
/* gtk_signal_disconnect_by_data (G_OBJECT (xtext->adj), xtext);*/
|
||||||
g_object_unref (G_OBJECT (xtext->adj));
|
g_object_unref (G_OBJECT (xtext->adj));
|
||||||
xtext->adj = NULL;
|
xtext->adj = NULL;
|
||||||
}
|
}
|
||||||
@ -608,8 +615,8 @@ gtk_xtext_destroy (GtkObject * object)
|
|||||||
xtext->orig_buffer = NULL;
|
xtext->orig_buffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
if (G_OBJECT_CLASS (parent_class)->dispose)
|
||||||
(*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
(*G_OBJECT_CLASS (parent_class)->dispose) (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -633,7 +640,7 @@ gtk_xtext_realize (GtkWidget * widget)
|
|||||||
GdkColor col;
|
GdkColor col;
|
||||||
GdkColormap *cmap;
|
GdkColormap *cmap;
|
||||||
|
|
||||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
gtk_widget_set_realized (widget, TRUE);
|
||||||
xtext = GTK_XTEXT (widget);
|
xtext = GTK_XTEXT (widget);
|
||||||
|
|
||||||
attributes.x = widget->allocation.x;
|
attributes.x = widget->allocation.x;
|
||||||
@ -733,7 +740,7 @@ gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
|
|||||||
height_only = TRUE;
|
height_only = TRUE;
|
||||||
|
|
||||||
widget->allocation = *allocation;
|
widget->allocation = *allocation;
|
||||||
if (GTK_WIDGET_REALIZED (widget))
|
if (gtk_widget_get_realized (GTK_WIDGET(widget)))
|
||||||
{
|
{
|
||||||
xtext->buffer->window_width = allocation->width;
|
xtext->buffer->window_width = allocation->width;
|
||||||
xtext->buffer->window_height = allocation->height;
|
xtext->buffer->window_height = allocation->height;
|
||||||
@ -2148,15 +2155,15 @@ gtk_xtext_scroll (GtkWidget *widget, GdkEventScroll *event)
|
|||||||
static void
|
static void
|
||||||
gtk_xtext_class_init (GtkXTextClass * class)
|
gtk_xtext_class_init (GtkXTextClass * class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GObjectClass *object_class;
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
GtkXTextClass *xtext_class;
|
GtkXTextClass *xtext_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass *) class;
|
object_class = (GObjectClass *) class;
|
||||||
widget_class = (GtkWidgetClass *) class;
|
widget_class = (GtkWidgetClass *) class;
|
||||||
xtext_class = (GtkXTextClass *) class;
|
xtext_class = (GtkXTextClass *) class;
|
||||||
|
|
||||||
parent_class = gtk_type_class (gtk_widget_get_type ());
|
parent_class = g_type_class_peek (g_object_get_type ());
|
||||||
|
|
||||||
xtext_signals[WORD_CLICK] =
|
xtext_signals[WORD_CLICK] =
|
||||||
g_signal_new ("word_click",
|
g_signal_new ("word_click",
|
||||||
@ -2167,7 +2174,7 @@ gtk_xtext_class_init (GtkXTextClass * class)
|
|||||||
gtk_marshal_VOID__POINTER_POINTER,
|
gtk_marshal_VOID__POINTER_POINTER,
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
2, G_TYPE_POINTER, G_TYPE_POINTER);
|
2, G_TYPE_POINTER, G_TYPE_POINTER);
|
||||||
object_class->destroy = gtk_xtext_destroy;
|
object_class->dispose = gtk_xtext_destroy;
|
||||||
|
|
||||||
widget_class->realize = gtk_xtext_realize;
|
widget_class->realize = gtk_xtext_realize;
|
||||||
widget_class->unrealize = gtk_xtext_unrealize;
|
widget_class->unrealize = gtk_xtext_unrealize;
|
||||||
@ -3226,7 +3233,7 @@ gtk_xtext_set_palette (GtkXText * xtext, GdkColor palette[])
|
|||||||
xtext->palette[i] = palette[i];
|
xtext->palette[i] = palette[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (xtext))
|
if (gtk_widget_get_realized (GTK_WIDGET(xtext)))
|
||||||
{
|
{
|
||||||
xtext_set_fg (xtext, xtext->fgc, XTEXT_FG);
|
xtext_set_fg (xtext, xtext->fgc, XTEXT_FG);
|
||||||
xtext_set_bg (xtext, xtext->fgc, XTEXT_BG);
|
xtext_set_bg (xtext, xtext->fgc, XTEXT_BG);
|
||||||
@ -3321,7 +3328,7 @@ gtk_xtext_set_font (GtkXText *xtext, char *name)
|
|||||||
|
|
||||||
gtk_xtext_fix_indent (xtext->buffer);
|
gtk_xtext_fix_indent (xtext->buffer);
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (xtext))
|
if (gtk_widget_get_realized (GTK_WIDGET(xtext)))
|
||||||
gtk_xtext_recalc_widths (xtext->buffer, TRUE);
|
gtk_xtext_recalc_widths (xtext->buffer, TRUE);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -3344,14 +3351,14 @@ gtk_xtext_set_background (GtkXText * xtext, GdkPixmap * pixmap)
|
|||||||
if (pixmap != 0)
|
if (pixmap != 0)
|
||||||
{
|
{
|
||||||
g_object_ref (pixmap);
|
g_object_ref (pixmap);
|
||||||
if (GTK_WIDGET_REALIZED (xtext))
|
if (gtk_widget_get_realized (GTK_WIDGET(xtext)))
|
||||||
{
|
{
|
||||||
gdk_gc_set_tile (xtext->bgc, pixmap);
|
gdk_gc_set_tile (xtext->bgc, pixmap);
|
||||||
gdk_gc_set_ts_origin (xtext->bgc, 0, 0);
|
gdk_gc_set_ts_origin (xtext->bgc, 0, 0);
|
||||||
xtext->ts_x = xtext->ts_y = 0;
|
xtext->ts_x = xtext->ts_y = 0;
|
||||||
gdk_gc_set_fill (xtext->bgc, GDK_TILED);
|
gdk_gc_set_fill (xtext->bgc, GDK_TILED);
|
||||||
}
|
}
|
||||||
} else if (GTK_WIDGET_REALIZED (xtext))
|
} else if (gtk_widget_get_realized (GTK_WIDGET(xtext)))
|
||||||
{
|
{
|
||||||
g_object_unref (xtext->bgc);
|
g_object_unref (xtext->bgc);
|
||||||
val.subwindow_mode = GDK_INCLUDE_INFERIORS;
|
val.subwindow_mode = GDK_INCLUDE_INFERIORS;
|
||||||
@ -3603,7 +3610,7 @@ gtk_xtext_render_page (GtkXText * xtext)
|
|||||||
int startline = xtext->adj->value;
|
int startline = xtext->adj->value;
|
||||||
int pos, overlap;
|
int pos, overlap;
|
||||||
|
|
||||||
if(!GTK_WIDGET_REALIZED(xtext))
|
if(!gtk_widget_get_realized(GTK_WIDGET(xtext)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (xtext->buffer->indent < MARGIN)
|
if (xtext->buffer->indent < MARGIN)
|
||||||
@ -3699,7 +3706,7 @@ gtk_xtext_render_page (GtkXText * xtext)
|
|||||||
void
|
void
|
||||||
gtk_xtext_refresh (GtkXText * xtext)
|
gtk_xtext_refresh (GtkXText * xtext)
|
||||||
{
|
{
|
||||||
if (GTK_WIDGET_REALIZED (GTK_WIDGET (xtext)))
|
if (gtk_widget_get_realized (GTK_WIDGET (xtext)))
|
||||||
{
|
{
|
||||||
gtk_xtext_render_page (xtext);
|
gtk_xtext_render_page (xtext);
|
||||||
}
|
}
|
||||||
@ -4683,7 +4690,7 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render)
|
|||||||
xtext->io_tag = 0;
|
xtext->io_tag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GTK_WIDGET_REALIZED (GTK_WIDGET (xtext)))
|
if (!gtk_widget_get_realized (GTK_WIDGET (xtext)))
|
||||||
gtk_widget_realize (GTK_WIDGET (xtext));
|
gtk_widget_realize (GTK_WIDGET (xtext));
|
||||||
|
|
||||||
h = gdk_window_get_height (gtk_widget_get_window (GTK_WIDGET (xtext)));
|
h = gdk_window_get_height (gtk_widget_get_window (GTK_WIDGET (xtext)));
|
||||||
|
Loading…
Reference in New Issue
Block a user