Commit 0554eeba62fd170b1527dc6702604a3ea5c39431

Authored by Perry Werneck
1 parent 9c46c02c
Exists in develop

Fixing some CodeQL alerts.

src/dialogs/colorscheme.c
... ... @@ -417,7 +417,6 @@
417 417 }
418 418  
419 419 g_message("Can't find color scheme");
420   - //gtk_combo_box_set_active(GTK_COMBO_BOX(widget),-1);
421 420  
422 421 // TODO: Create an entry for this scheme as "custom" and select it.
423 422  
... ...
src/dialogs/font/chooser.c
... ... @@ -204,8 +204,6 @@
204 204  
205 205 if(chooser->font.face) {
206 206  
207   -// debug("%s",__FUNCTION__);
208   -
209 207 cairo_set_font_face(cr,chooser->font.face);
210 208 cairo_set_font_size(cr,15);
211 209  
... ...
src/dialogs/load.c
... ... @@ -141,9 +141,6 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_
141 141 // 0 - Filename xxxxxxxxx.xxxxxxxxx.xxxxxxxxx.xxxxxxxxx.xxxxxxxxx. x
142 142 // 1 - Charset xxxxxxxxx.xxxxxxxxx. Format: xxxxxxxxx.xxxxxxxxx.
143 143  
144   -
145   -// gtk_window_set_deletable(GTK_WINDOW(dialog),FALSE);
146   -
147 144 // Setup visual elements
148 145 // https://developer.gnome.org/hig/stable/visual-layout.html.en
149 146 GtkWidget *widget;
... ... @@ -171,13 +168,6 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_
171 168 gtk_grid_attach(grid,widget,0,0,1,1);
172 169 gtk_label_set_mnemonic_widget(GTK_LABEL(widget),dialog->filename);
173 170  
174   - /*
175   - gtk_entry_set_icon_from_icon_name(GTK_ENTRY(dialog->filename),GTK_ENTRY_ICON_SECONDARY,"document-open");
176   - gtk_entry_set_icon_activatable(GTK_ENTRY(dialog->filename),GTK_ENTRY_ICON_SECONDARY,TRUE);
177   - gtk_entry_set_icon_tooltip_text(GTK_ENTRY(dialog->filename),GTK_ENTRY_ICON_SECONDARY,_("Select file"));
178   - g_signal_connect(G_OBJECT(dialog->filename),"icon-press",G_CALLBACK(icon_press),dialog);
179   - */
180   -
181 171 g_signal_connect(dialog->filename,"changed",G_CALLBACK(filename_changed),dialog);
182 172  
183 173 gtk_entry_bind_to_filechooser(
... ...
src/dialogs/print/draw.c
... ... @@ -114,8 +114,6 @@
114 114 size_t col;
115 115 rect.x = operation->font.info.margin.left;
116 116  
117   -// debug("Drawing: %u row=%u selection=%p pos=%u", (unsigned int) drawing, row, selection, (unsigned int) pos);
118   -
119 117 for(col = 0; col < selection->bounds.width;col++)
120 118 {
121 119 if(selection->contents[pos].chr)
... ...
src/dialogs/print/print.c
... ... @@ -212,7 +212,7 @@
212 212 // Setup defaults
213 213 widget->mode = LIB3270_CONTENT_ALL;
214 214 widget->settings.show_selection = FALSE;
215   - widget->font.name = NULL; // g_strdup(v3270_default_font);
  215 + widget->font.name = NULL;
216 216  
217 217 }
218 218  
... ...
src/dialogs/print/settings.c
... ... @@ -91,9 +91,6 @@ static void V3270PrintSettings_init(V3270PrintSettings *widget)
91 91 gtk_grid_set_row_spacing(GTK_GRID(widget),6);
92 92 gtk_grid_set_column_spacing(GTK_GRID(widget),12);
93 93  
94   - // g_signal_connect(G_OBJECT(widget->color),"update-colors",G_CALLBACK(color_scheme_changed),widget);
95   - // g_signal_connect(G_OBJECT(widget->selected),"toggled",G_CALLBACK(toggle_show_selection),widget);
96   -
97 94 for(f=0;f<G_N_ELEMENTS(text);f++)
98 95 {
99 96 GtkWidget *label = gtk_label_new_with_mnemonic(g_dgettext(GETTEXT_PACKAGE,text[f]));
... ...
src/terminal/keyboard/accelerator.c
... ... @@ -71,33 +71,11 @@
71 71  
72 72 gboolean v3270_accelerator_compare(const V3270Accelerator * accel, const guint keyval, const GdkModifierType mods)
73 73 {
74   - // Problems:
75   -
76   -// debug("%s: keys: %08x %08x",__FUNCTION__,accel->key,keyval);
77   -
78   - // It's the same key?
79   - if(accel->key != keyval)
80   - {
81   - g_autofree gchar * acckey = gtk_accelerator_name(accel->key,accel->mods);
82   - g_autofree gchar * qkey = gtk_accelerator_name(keyval,mods);
83   -// debug("%s: Rejected by key %08x %08x (%s %s)",__FUNCTION__,accel->key,keyval,acckey,qkey);
  74 + // It's the same key and mods?
  75 + if(accel->key != keyval || accel->mods != mods)
84 76 return FALSE;
85   - }
86 77  
87 78 // The same key and same mods, Found it!
88   - if(accel->mods == mods)
89   - return TRUE;
90   -
91   -/*
92   -#ifdef DEBUG
93   - {
94   - g_autofree gchar * acckey = gtk_accelerator_name(accel->key,accel->mods);
95   - g_autofree gchar * qkey = gtk_accelerator_name(keyval,mods);
96   -// debug("%s: accel=%s (%0u/%08x) query=%s (%u/%08x) xor=%08x and=%08x",__FUNCTION__,acckey,accel->key,accel->mods,qkey,keyval,mods,(accel->mods^mods),(accel->mods & mods));
97   - }
98   -#endif // DEBUG
99   -*/
100   -
101 79 return TRUE;
102 80 }
103 81  
... ...